Fix for S3 metadata on moto_server

When running moto via `moto_server` the `request.headers` object is a
list of dicts, not the special object that HTTPretty provides. This
commit fixes setting metadata on S3 when using `moto_server` and doesn't
break using HTTPretty I believe.