Add block support for the  helper
Merge pull request #10065 from spohlenz/mail_to_block

Add block support for the mail_to helper
Ensure mail_to helper does not modify the given html options hash
Refactor mail_to to not generate intermediate hashes when adding href

There's no need to use Hash#merge with a new hash just for setting the
href option to pass it through. Since we're always dealing with a new
html_options hash, we're free to just set the value instead.
Use the correct pk field from the reflected class to find the old record

The implementation was using the source class foreign key field instead
of the reflected primary key one to find the old record.

For instance, for this scenario

    class Bulb < ActiveRecord::Base
      belongs_to :car, :touch => true
    end

    class Car < ActiveRecord::Base
      has_many :bulbs
    end

the current implementation was trying to do this query:

    Car.where(car_id: X).first

where we should be doing this query:

    Car.where(id: X).first

This should hopefully fix the build.
Avoid an attempt to fetch old record when id was not present in touch callback
Correctly parse bigint defaults in PostgreSQL