Preparing for 4.0.10.rc1 release
Merge pull request #16649 from Agis-/pg-columns-for-distinct

Fix postgresql adapter #columns_for_distinct trimming whitespace it shouldn't

Conflicts:
	activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
CHANGELOG & improvements to #16649

* Require either FIRST or LAST qualifier for "NULLS ..."
* Require whitespace before "NULLS ..."

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #16756 from huoxito/dont-mess-railties-default-order

Dont mess with default order engines load (4.1.6.rc1 regression)
Conflicts:
	railties/lib/rails/application.rb
Preparing for 4.0.10.rc2 release
Do not mark object as persisted after an association is saved

Callback order in Active Record objects are important. Users should not
define callbacks before the association definition or surprising
behaviours like the described at #3798 will happen. This callback order
dependency is documented at https://github.com/rails/rails/blob/31bfcdc77ca0d8cec9b5fe513bdc6f05814dd4f1/activerecord/lib/active_record/associations.rb#L1222-1227.

This reverts #15728.

Fixes #16620.

Conflicts:
	activerecord/lib/active_record/autosave_association.rb
	activerecord/test/cases/associations/has_many_associations_test.rb
Use latest 2.1 version of sprockets-rails
Preparing for 4.0.10 release
Merge branch '4-0-10' into 4-0-stable

Conflicts:
	activerecord/CHANGELOG.md