Store attachments in a separate binary-encoded database.

Namespace all keys, so models can co-exist in a database.
Attachments aren't quite working yet, possibly because I have
misunderstood something about how batch operations work.