don't convert mailer default values to procs

Invoke mailer defaults as procs only if they are procs, do not convert
with to_proc.  That an object is convertible to a proc does not mean it's
meant to be always used as a proc.  Fixes #11533
text_area should handle nil value option like text_field
Simplify select_one method.

The select_all method always returns ActiveRecord::Result instance,
and the ActiveRecord::Result includes Enumerable mixin.
If #empty?, #first method returns nil. Thus we can simplify this method.
Fix indentation.
Merge pull request #11570 from joelcogen/harmonize_text_field_and_area

text_area should handle nil value option like text_field
Merge pull request #11579 from kennyj/refactor_20130724

Simplify select_one method.
Merge pull request #11559 from bughit/11533_to_proc

don't convert mailer default values to procs
AM Guide: Should be "different formats".
Cleanup task for informing about hstore
Merge pull request #11584 from Peeja/actionmailer-guide-typo

ActionMailer Guide: Should be "different formats".
Merge pull request #11585 from vipulnsward/hstore_change

Cleanup task for informing about hstore
Added test cases and a fix for rails/rails#10865.

Assuming Topic has_many Replies and Reply belongs_to Topic, the counter cache
was incremented twice if reply is saved after reassignment, as follows:

    reply.topic = topic  # triggers BelongsToAssocation#replace
    reply.save           # triggers belongs_to_counter_cache_after_update

The problem is caused by duplicate work.

This commit adds a flag to the reply if it has already triggered an increment,
but has not been saved yet. Thus, when the reply is actually saved, the
superfluous increment does not occur.

Note the following edge case:

    reply.topic = t1    # not saved, but counter updated
    t2.replies << t2    # save! called, previous change needs to be undone