Handle S3 metadata input/output

Fixes #273 and fixes https://github.com/aws/aws-cli/issues/356.  This required changes for both input serialization and response parsing.