Eliminated boilerplate from HostController and HostDaemonFacade.
This change combines multiple closely related refactorings designed
mostly to make the code easier to understand:
- The start method of HostController now uses local variables to pass
information between its local functions, rather than using
positional arguments and the bind method.
- The HostDaemonFacade class now uses promises instead of callbacks.
- Promises converted from callbacks with multiple parameters now contain
data with named fields.
- The remoting.Error.handler function is used to convert unexpected
runtime errors into exceptions that are reported to the user instead
of causing multi-step operations to simply hang.
BUG=471928
Review URL: https://codereview.chromium.org/
1040233002
Cr-Commit-Position: refs/heads/master@{#324909}