Adds reference attachment support (with test)
Adds cleanup to test and bumps submodule references
Merge pull request #856 from lukecampbell/attachments

Attachment Reference Support