Ensure attachments have unique filenames

Also introduces a new helper method on the Attachment model for
generating the attachable model name.

Note that the filename uniqueness check is not case-sensitive.
Test suite creates unique attachments

Attachment validations are skipped in the fixer/cleanup tests so that
we can intentially create duplicates.