buffet: Fix command progress update JSON for GCD server

GCD server expects command progress updates to contain a device-specific
JSON object, while buffet was providing just an integer. Make GCD server
happy by creating an object instead by sticking another "progress" property
as in {"progress":{"progress":100}}.

Also added some unit tests to cover the rest of UpdateCommand notifications.

BUG=brillo:779
TEST=`FEATURES=test emerge-link libchromeos buffet`

Change-Id: I210de62abae7fa1c357449b0c07b5298e8606ec0
Reviewed-on: https://chromium-review.googlesource.com/264867
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
2 files changed