Fix bug 1057286: Split file attachments into a separate application

Don't merge!

This is being PR'd to get eyes on it for review purposes. There will be a couple of test failures; one I suspect is due to the migrations, which need work anyway in order not to break everyone's VMs and to not break production when this lands. There's also a weird issue with the template tests that I'm still debugging.

- [ ] Fix migrations
- [ ] Fix test failures
`undefined name '_format_attachment_obj'`