buffet: Hook up XMPP to deliver push notifications to buffet

Now using XMPP not only for the device presence but for delivering
push notifications, specifically COMMAND_CREATED notification and
extracting the command instance from the notification message.
Add the commands received over XMPP to the command execution queue.

The remaining tasks for XMPP (making polling optional, provide
notification channel configuration options for buffet, update the
channel changes on GCD server, etc) are coming in follow-up CLs.

BUG=brillo:458
TEST=`FEATURES=test emerge-link buffet`
     Tested this on the device.

Change-Id: I6ba42e3687563133734aaf36d3802d6f4888f348
Reviewed-on: https://chromium-review.googlesource.com/272782
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/device_registration_info.h b/buffet/device_registration_info.h
index 5a9a1a3..7732da4 100644
--- a/buffet/device_registration_info.h
+++ b/buffet/device_registration_info.h
@@ -93,7 +93,7 @@
     const std::string& subpath = {},
     const chromeos::data_encoding::WebParamList& params = {}) const;
 
-  // Starts GCD device if credentials avalible.
+  // Starts GCD device if credentials available.
   void Start();
 
   // Checks whether we have credentials generated during registration.
@@ -199,6 +199,7 @@
   void PeriodicallyPollCommands();
 
   void PublishCommands(const base::ListValue& commands);
+  void PublishCommand(const base::DictionaryValue& command);
 
   void PublishStateUpdates();
 
@@ -228,6 +229,7 @@
   void OnConnected(const std::string& channel_name) override;
   void OnDisconnected() override;
   void OnPermanentFailure() override;
+  void OnCommandCreated(const base::DictionaryValue& command) override;
 
   // Transient data
   std::string access_token_;