Fix .update_all and .delete_all when using a condition on a joined table
in a default_scope.

`Model.joins(...).where(condition_on_joined_table).update_all` /
`delete_all` worked, but the same operation implemented with a
default_scope generated a SQL error because ActiveRecord ignored the
join but implemented the where condition anyways.
`CollectionAssociation#empty?` respects newly builded records
rake railties:install:migrations respects the order of railties
Revert benchmark helper regression. Use a #capture within a #benchmark
block. Breaks benchmark calls that return non-String values otherwise.

Revert "add benchmark helper that works in erb"

This reverts commit 904e544cc8f5846de7c31827bb5556c6a238c0de.

Conflicts:
	actionpack/lib/action_view/helpers.rb
	actionpack/lib/action_view/helpers/benchmark_helper.rb
	actionpack/test/template/benchmark_helper_test.rb
Rename :value option to :selected, in line with other select helpers
Add tests for time & datetime.
Add documentation.
Address test_create_when_database_exists_outputs_info_to_stderr failures

When tested with ruby-2.0.0-rc1 `rake test` executes this test
even if the target adapter is not mysql nor mysql2.
test for ActiveModel::Conversion#to_partial_path and namespaced models
Merge pull request #8938 from colinbm/date_select_value

Rename :value to :selected for date_select, and add missing tests/docs
Merge pull request #8939 from senny/to_partial_path_test_to_prevent_regressions

test case for ActiveModel::Conversion#to_partial_path and namespaced models
Merge pull request #8942 from yahonda/tested_only_with_mysql

Address test_create_when_database_exists_outputs_info_to_stderr failures
Account for ignored cookie set by turbolinks
Use Rails 4 find_by in README [ci skip]
Merge pull request #8947 from joneslee85/patch-1

Use Rails 4 find_by in README [ci skip]
Merge pull request #8946 from reednj77/rack-cache-headers

Account for ignored cookie set by turbolinks
ActiveRecord <-> Active Record [ci skip]
Merge pull request #8949 from joneslee85/patch-2

ActiveRecord <-> Active Record [ci skip]
Revert "Merge pull request #8942 from yahonda/tested_only_with_mysql"

This reverts commit 1fc294f988e93ac59057a16b0e44b9cf93af9720, reversing
changes made to fb9ac47c286fbdfe05263d4d0346e50892090603.

Reason: these tests should run fine independent of database, since they
should only take into account the configuration options. The problem was
related to a change in the way "nil" is handled by the rescue clause, in
Ruby 2.0 it raises an exception asking for class or module, in 1.9 it
passes.
Improve mysql database tasks handling to ensure we always rescue from an exception

We were previously rescuing "nil" when no exception class was found.
This does work in 1.9.3, but does not in 2.0, raising an exception
asking for a class or module to be given to the rescue clause.

Thanks @yahonda for catching this.
Revert "log at debug level what line caused the redirect_to"

This reverts commit 3fa00070047b5d019d39e691598ee2890283d052.

Reason: This message is usually not accurate and annoying:

    Redirected by ~/.rbenv/versions/1.9.3-p327-perf/lib/ruby/1.9.1/logger.rb:371:in `add'`
Merge pull request #8930 from cordawyn/ordered_railties

rake railties:install:migrations respects the order of railties