HashWithIndifferentAccess better respects #to_hash

In particular, `#update`, `#merge`, `#replace` all accept objects which
respond to `#to_hash`, even if those objects are not Hashes directly.
Ensure we are returning either `true` or `false` for `#==`

460eb83d cused `ActiveRecord::Base#==` to sometimes return `nil` in some cases,
this ensures we always return a boolean value. Also fixed a similar problem in
AR reflections.
Merge pull request #14518 from Peeja/hash-wia-update-respects-to-hash-4-1-stable

HashWithIndifferentAccess better respects #to_hash (4-1-stable backport)
Merge pull request #14528 from planas/patch-1

Require yaml explicitly on #database_configuration
Merge pull request #14509 from lukesteensen/pg-array-defaults

remove calls to sql_type on pg columns
Conflicts:
	activerecord/test/cases/adapters/postgresql/array_test.rb
Tiny doc fix for Strong Parameters

- accepts_nested_attribute_for -> accepts_nested_attributes_for