Fix attachments missing from DocumentRevision

Retrieving a document via getAllDocuments returns document with their
attachments missing.
Fix document retrieval for getAllDocuments and getAllDocumentsWithIds
Add tests for attachments on objects retrieved from getAllDocuments and
getAllDocumentsWithIds
If you're not going to check whether your call was successful, I wouldn't bother sending error in. But you should really be checking the return value for errors.