Attachments (almost) entirely implemented; all tests pass.
This is a lie, because attachments are not deleted when their owner is removed.
YET.
Merging heavily-refactored attachment support.