Allow put method to specify metadata on objects

We change the uploadType to multipart, and include any metadata passed
into the put method with the first portion of the upload.

Since this upload type is explicit about the Content-Type of the object
being uploaded, GCS responses to get requests for objects uploaded with
the new put method are now interpretted (properly) as javascript
objects, rather than text, which requires a separate JSON.parse step. We
handle both for backwards compatibility.