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
How would the best way to add your suggested change into the code base, via another PR, adding to this one or something else?