Add patch to fix Rails' hash types with Ruby 2.1.1

Might also help us with Ruby 2.2 until we have Rails 4.
Merge pull request #1244 from opf/fix/ruby_2.1.1_hash_select_and_reject

Add patch to fix Rails' hash types with Ruby 2.1.1
infer content type from contents of file instead of its file extension
* defaults to application/binary as its more secure than octet-stream
* set nosniff header to instruct browsers not to guess content type
migration to set content types of all existing attachments