Make Attachment base class abstract

We are no longer creating attachments without the STI "type" attribute
set in the app, which allows us to reorganise attachment code such
that the file-related code is in FileAttachment and HtmlAttachment
contains code related to html attachments. The base class will now
raise an exception if an attempt is made to save an instance without
a specific type set.

Note that the attachment_data association is still on the base class,
otherwise the file-related scopes would not work on associations,
e.g. edition.attachments.with_filename(filename).
Fix bug that causes exceptions when file is blank

Downcasing a non-existant filename was causing problems.
Don't kill attachment file cache

The attachments controller code was killing attachment_data params
unless a file was present, which didn't play nice with the carrierwave
file caching feature. This moves the code for handling nested
attributes out of the controller and into the model.
Merge pull request #1246 from alphagov/65015464-file-attachments-bug

File attachments bugs

https://www.pivotaltracker.com/story/show/65015464