Move attachment code into couch_att

This is an attempt to isolate the attachment record and
some related code. This will allow seamless upgrades
over time.
Merge pull request #134 from cloudant/24518-attachment-metadata

Move attachment code into couch_att