[CrOS MultiDevice] Adjust RemoteDevice Mojo struct for setup flow.

As part of the MultiDeviceSetup flow, we use JS <==> C++ Mojo bindings,
so we were transferring RemoteDevice objects from C++ to JS.
RemoteDevice objects hold a "public_key" field, which is a std::string
containing randomly-generated bits. These bits are not all necessarily
ASCII characters and often contain NULL characters before the end of the
string. The std::string class handles this situation, but JS strings do
not. Thus, transferring the public_key field was problematic because the
key would not be received correctly on the JS side.

This CL modifies device_sync.mojom's RemoteDevice struct:
* The device ID (human-readable string) is included instead of the
  public key.
* StructTraits use RemoteDeviceRef::DerivePublicKey() to retrieve the
  public key on the other side of the pipe.

Additionally, this CL modifies multidevice_setup.mojom such that
SetHostDevice() now takes a device ID instead of a public key as a
parameter.

Bug: 824568
Change-Id: I16bda595ce25ba9321f11d3f455fbbeec71d7809
Reviewed-on: https://chromium-review.googlesource.com/1149328
Reviewed-by: Ryan Hansberry <hansberry@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578392}
15 files changed