Pass a base relation to build_default_scope when joining

This allows the default scope to be built using the current table alias.
Resolves #12770
Still touch associations when theres no timestamp

Prior to Rails 4.0.4 when touching a object which doesn't have timestamp
attributes (updated_at / updated_on) rails would still touch all
associations. After 73ba2c14cd7d7dfb2d132b18c47ade995401736f it updates
associations but rollsback because `touch` would return nil since
there's no timestamp attribute
Revert "Merge pull request #8313 from alan/only_save_changed_has_one_objects"

This reverts commit 6e3ab3e15faf782f6a937ccf5574a4fb63e3e353, reversing
changes made to 39e07b64ce3f4bb55e60ba0266e677f8e4f4893a.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/autosave_association_test.rb
Merge pull request #14390 from huoxito/true-touch

Still touch associations when theres no timestamp
Use rails convetions
Fix the update_versions release task
Fix task comment to match which file should be changed

[ci skip]
create indexes inline in CREATE TABLE for MySQL

This is important, because adding an index on a temporary table after
it has been created would commit the transaction

Conflicts:
	activerecord/CHANGELOG.md
Fixes bugs for using indexes in CREATE TABLE by adding checks for table existence

Also:
  - updates tests by stubbing table_exists? method
  - adds entry for creating indexes in CREATE TABLE to changelog
link to "Schema migration" Wikipedia page. Closes #14479. [ci skip]
[ci skip] Fix Pull Request URL in 4.1 release note.
Merge pull request #14487 from JuanitoFatas/patch/fix-release-note-url

[ci skip] Fix Pull Request URL in 4.1 release note.
Merge pull request #14480 from steverice/mysql-indexes-in-create-table

Create indexes inline in CREATE TABLE for MySQL
Invert the conditionals to make easier to read

Also improve some of the code conventions
Remove unneeded comments about feature support on the adapters

These comments will likely be outdated with time and doesn't include
any information that can't be found in the adapters
Improve the method

* cache `o.name` value
* Avoid extra `concat` call
* Avoid extra `<<` call
Make method private
Don't use send when we own the method
No need to gsub the string
No need to use begin/end blocks