Fix fake-gcd-server to include device resource timestamp

Buffet now requires lastUpdateTimeMs timestamp on device resource,
so changed the test fake GCD server to include the timestamp.

Also, fixed GET request for '/devices/<id>' to retrieve the api_key
from the authorization header via access token, when this call
originates from buffet process (which does not include "?key=..."
query parameters on the URL).

BUG=brillo:1261
TEST=`test_that -b link <ip> "e:buffet_.*"`

Change-Id: I9e0a6bef538ba94ca6a57ca4b6fb873d79bc3eeb
Reviewed-on: https://chromium-review.googlesource.com/288219
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Aaron Kemp <kemp@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
1 file changed