Refactor attachments methods of CouchDatabase into own partial class (also refactored documentation comments, some of the exception checks that were being done twice and code layout)