buffet: Added advanced error reporting

Created chromeos::Error class that encapsulates rich error
information from various system domains.

Swept GCD device registration, HTTP transport and utilities
to always return additional error information when the caller
requests it. This includes internal errors, general HTTP errors
as well as parsing and returning specific GCD and OAuth2 server
error responses.

Also fixed a number of existing linter warnings.

BUG=chromium:366709
TEST=All existing and new unit tests pass.

Change-Id: Ic01622a8efa3dc365ec106e595b09536818b9b23
Reviewed-on: https://chromium-review.googlesource.com/198772
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
25 files changed
tree: ac8970269b0b6e607d59e0fa9bc7155764dbcd91
  1. attestation/
  2. buffet/
  3. common-mk/
  4. .gitignore
  5. LICENSE
  6. PRESUBMIT.cfg