add support for post attachments and batch requests

This big commit includes two API changes:
It adds a batch function to the client object and an attachment key
to the metadata object of the create function. Some internal changes
and better test coverage come along as well.
0.6.0