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.