Remove j alias for ERB::Util.json_escape
AR::Relation#model would be a better API than AR::Relation#klass
Refactored common date and time calculations.

* Added the `DateAndTime::Calculations` module that is included in Time
  and Date. It houses common calculations to reduce duplicated code.
* Simplified and cleaned-up the calculation code.
* Removed duplication in tests by adding a behavior module for shared
  tests. I also added some missing tests.
AM::Validation#validates: ability to pass custom exception to `:strict` option
Added a note for smtp_settings.enable_starttls_auto
Fix occasional microsecond conversion inaccuracy

ActiveRecord::ConnectionAdapters::Column#microseconds did an unnecessary
conversion to from Rational to float when calculating the integer number
of microseconds. Some terminating decimal numbers in base10 are
repeating decimal numbers in base2 (the format of float), and
occasionally this causes a rounding error.
Patch & explanation originally from Logan Bowers.
Make a doc example output in match actual output

Make doc output in grouped_options_for_select divider example match
actual output. The options groups were in backwards order of actual.
Remove the active_model require from action_dispatch.

Since we removed the ActiveModel dependenxy from ActionPack at
166dbaa7526a96fdf046f093f25b0a134b277a68 we don't need to require it
anymore.

Closes #7370
Merge pull request #7024 from bogdan/strict_validation_custom_exception

AM::Validation#validates: custom exception for :strict option

Conflicts:
	activemodel/CHANGELOG.md
Fix slightly broken Markdown syntax in actionpack/CHANGELOG.md
Renaming active_record_deprecated_finders to activerecord-deprecated_finders

For consistency with the other AR extension plugins we are creating.
Use benchmark/ips to measure AR performance

This means we can more easily compare numbers, and we don't have to
specify a single N for all reports, which previously meant that some
tests were running many more/fewer iterations than necessary.
Increase benchmark time to 20 seconds.

I think that 5 seconds was a bit low for our purposes.

Also enable it to be configured via env vars.

We also need to scale the number of records up/down depending on how
long we're running the benchmark for.
Merge pull request #7373 from hollowspace/patch-1

Fix slightly broken Markdown syntax in actionpack/CHANGELOG.md
Fix merge error when Equality LHS is non-attribute

This is at best a band-aid for a more proper fix, since it won't truly
handle the removal of the previous equality condition of these other
nodes. I'm planning to put in some work on ARel toward supporting that
goal.

Related: rails/arel#130, ernie/squeel#153, ernie/squeel#156
Merge pull request #7352 from aripollak/microsecond-timestamp

Fix occasional microsecond conversion inaccuracy
column default extraction should handle newlines.

Fixes #7374
Avoid deep_dup when intantiating.

deep_dup is slow. we only need to dup the values, so just do that
directly.
Optimize instantiation for models which don't use serialize

Those z's were hard to type.
The default value can be set once in #column_defaults

Rather than doing it every time an instance is instantiated.