Accept belongs_to assoc. keys in ActiveRecord queries

Allows you to specify the model association key in a belongs_to
relationship instead of the foreign key.

The following queries are now equivalent:

Post.where(:author_id => Author.first)
Post.where(:author => Author.first)

PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
PriceEstimate.where(:estimate_of => treasure)
Use the SynchronousQueue as default in production and development.

We should not let the users use the ThreadedConsumer without know about
the risks
Allow users to configure the queue for the mailers

This allow the users to do:

    config.action_mailer.queue = MyQueue.new

and

    class UsersMailer < ActionMailer::Base
      self.queue = MyQueue.new
    end
Define a SynchronousQueue for test in Action Pack.

We don't need to rely on rails/queueing in Action Pack tests
Updating the documentation to ActionMailer::Base.queue
Remove the queue configuration from the environments templates since the
default is the SynchronousQueue.
Merge pull request #7622 from marcandre/doc

Update documentation for CollectionProxy [ci skip]
Merge pull request #7273 from beerlington/foreign_key_model_queries

Convert model name to foreign key in queries
Fix nested association references

Previously the reflection would be looked up on the wrong class. However
the test passed because the examples referred back to themselves.
Refactor to remove some duplication
Pass in the model class rather than engine

In some circumstances engine was Arel::Table.engine which for separate
reasons was an ActiveRecord::Model::DeprecationProxy, which caused a
deprecation warning.

In any case, we want the actual model class here, since we want to use
it to infer information about associations.
change app/plugin generators to be more SCM agnostic

Users of other SCM's can now generate rails
apps that will add the "empty" directories to source control,
but will not have a useless .gitignore or mis-named .gitkeep
files.

* Change `rails new` and `rails plugin new` generators to name
  the `.gitkeep` as `.keep` in a more SCM-agnostic way.

* Change `--skip-git` option to only skip the `.gitignore` file
  and still generate the `.keep` files.

* Add `--skip-keeps` option to skip the `.keep` files.

It closes #2800.
Merge pull request #7614 from frodsan/scm_agnostic

add --skip-ignore and --skip-keeps options to generators.
update ConnectionAdaptar::Column#type_cast_code to be compatible with 3.2 branch
Merge pull request #7623 from tchandy/master

update ConnectionAdapter::Column#type_cast_code to be compatible with rails 3.2 branch
extend ActiveSupport::Deprecation with self, allow other objects to extend/include it also.

test local deprecation

deprecator object

Test ActiveSupport::Deprecation when included
Change ActiveSupport::Deprecation to class.

ActiveSupport::Deprecation is now a class rather than a module. You can
get instance of ActiveSupport::Deprecation calling #instance method.

  ActiveSupport::Deprecation.instance

But when you need to get new object od ActiveSupport::Deprecation you
need to just call #new.

  @instance = ActiveSupport::Deprecation.new

Since you can create a new object, you can change the version and the
name of the library where the deprecator concerned.

  ActiveSupport::Deprecation.new('2.0', 'MyGem')

If you need use another deprecator instance you can select it in the
options of deprecate method.

  deprecate :method, :deprecator => deprecator_instance

Documentation has been updated.
Merge pull request #6348 from LTe/no_global_depreactations

Allow ActiveSupport::Deprecation features to be used by rails applications and library authors
refactor store_accessor
Merge pull request #7524 from al2o3cr/store_boolean

Add boolean type conversion for AR::Store