26566 maximize attachment sharing between revisions of a document

This fixes multiple copies of the same attachment in case of two documents having the same attachment content.