Extract ActiveSupport::NumberHelper methods to classes

Due to the overall complexity of each method individually as well as the
global shared private module methods, this pulls each helper into it's
own converter class inheriting from a generic `NumberBuilder` class.

* The `NumberBuilder` class contains the private methods needed for each helper
method an eliminates the need for special definition of specialized private
module methods.
* The `ActiveSupport::NumberHelper::DEFAULTS` constant has been moved
into the `NumberBuilder` class because the `NumberBuilder` is the only
class which needs access to it.
* For each of the builders, the `#convert` method is broken down to
smaller parts and extracted into private methods for clarity of purpose.
* Most of the mutation that once was necessary has now been eliminated.
* Several of the mathematical operations for percentage, delimited, and
rounded have been moved into private methods to ease readability and
clarity.
* Internationalization is still a bit crufty, and definitely could be
improved, but it is functional and a bit easier to follow.

The following helpers were extracted into their respective classes.

* `#number_to_percentage` -> `NumberToPercentageConverter`
* `#number_to_delimited` -> `NumberToDelimitedConverter`
* `#number_to_phone` -> `NumberToPhoneConverter`
* `#number_to_currency` -> `NumberToCurrencyConverter`
* `#number_to_rounded` -> `NumberToRoundedConverter`
* `#number_to_human_size` -> `NumberToHumanSizeConverter`
* `#number_to_human` -> `NumberToHumanConverter`
Add regression test for IpSpoofAttackError issue

See #10780
Merge pull request #10996 from mattdbridges/number-helper-refactor

Refactor and clean up number helpers

Conflicts:
	activesupport/lib/active_support/number_helper.rb
Fix note about class attribute accessors deprecated file [ci skip]
Remove dead comment from AS extensions guide [ci skip]
Remove note about removed local_constant_names method from guides [ci skip]
Make load of NumberHelper thread safe
Merge pull request #12123 from aredondo/master

Add regression test for IpSpoofAttackError issue

Closes #10780
Make execute priave API
Options are not optional
:sicssors:
Merge remote-tracking branch 'origin/master'
Avoid generating more strings while iterating to create methods

Use the already existing strings instead of creating a new one each time
just to test if it responds to the methods.
Added back the `encode_big_decimal_as_string` option with warning

Also added the missing CHANGELOG entry for #12183 @ 80e7552073 and
4d02296cfb.
Merge pull request #13060 from chancancode/change_log_for_json_refactor

CHANGELOG for JSON refactor + added back the `encode_big_decimal_as_string` option with warning
Modify the Hash#assert_valid_keys error message so that it shows the valid keys. Also, show the wrong value as it was entered.

{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore

{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: "failore". Valid keys are: :failure, :funny

{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: :failore. Valid keys are: :failure, :funny

Conflicts:
	activerecord/CHANGELOG.md

Closes #11624.
Tidy up previous commit, fix message assertion and improve tests
Fix header Content-Type: #<Mime::NullType:...> in localized template

This PR fixes #13064 regression bug introduced by the #8085

Now in _process_format when the format is a Mime::NullType nothing is written in self.content_type.
In this way the method Response#assign_default_content_type_and_charset can
write the the default mime_type.
Merge branch 'format_localized_template' of https://github.com/acapilleri/rails

Conflicts:
	actionpack/CHANGELOG.md
Cleanups in comment about conditional