Merge pull request #15358 from arthurnn/redefine_habtm_fix

Fix redefine a has_and_belongs_to_many inside inherited class
Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #15269 from arunagw/aa-fixes-8930

rake railties:install:migrations respects the order of railties
Merge pull request #14834 from al2o3cr/issue14155

Correctly alias table names when joining more than once
Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

This reverts commit 38cf00e553bc709cd1f9c4b14992d9730554f757.

Conflicts:
	railties/CHANGELOG.md
Merge pull request #15393 from tonytonyjan/patch-2

Fix documentation
Add missing `:param` option from the docs for Mapper#match [ci skip]
Option discovered by @zackperdue in #14741, implemented in #5581.