Store ec2 credentials blob as json

For compatibility with the v3/credentials API, the blob dict should
be stored serialized as json.  To maintain backwards compatibility
with existing DB contents stored via the ec2tokens interface, we
fall back to the previous behavior if we fail to load the blob.

Change-Id: I21f068c308df5aa6a818031d3bc86a81b2bd25f4
Closes-Bug: #1259584
Merge "Store ec2 credentials blob as json"