COUCHDB-259 allow arbitrary data to be stored along attachments

Also: Allow content_type to be changed via stub structure as well.

This includes my last pull request (which only allowed the content type to be changed). Tests included as I see fit, but comments welcome.