Create a machine-readable report of update runs

This addresses two problems: first, the issue of touch update messages
getting flushed out of the main log in feedback reports (b/173545945),
and second, the need for upcoming diagnostics features to be able to
read the current firmware versions for touch devices.

This CL only adds report lines to updaters that I'm able to test; the
others will come in a future CL. The updaters were tested on the
following devices:

* Atmel: Samus
* Elan: Morphius
* Goodix: Morphius
* Google: Eve
* Raydium: Sparky360
* Synaptics: Sparky360
* Wacom: Eve, Sparky360

BUG=b:173545945
TEST=check initial version lines are correct, simulate update failures
     by making local changes to updater scripts. Check `make_json_safe`
     removes quotes and newlines (`make_json_safe "$(printf 'x"\ny')"
     should return just "xy", without the quotes)

Change-Id: I0eb2587ea5f987494045495f60c03ebb127264af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/touch_updater/+/2773576
Commit-Queue: Harry Cutts <hcutts@chromium.org>
Tested-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
11 files changed