Exception handling for controllers using ActionController::Live

Any exceptions that occured at the view or controller level for a
controller using ActionController::Live would cause the server to either
hang with an open socket indefinitely, or immediately crash (depending
on whether the server was launched with rails s or directly). Changed
the behavior of exceptions to act the same as streaming templates for
html requests, and allow for an on_error callback if needed.
Added documentation to the FormBuilder class, should help
clarify issue #10115. Also made the field_helpers an explicit list of
methods.
Added a bang to the end of +raise_nested_attributes_record_not_found+
method to signify an exception possibly being raised.
Merge pull request #10123 from wangjohn/added_bang_to_raise_nested_attributes_method

Added a bang to the raise_nested_attributes_record_not_found method
each to each_value; remove unused vars
Merge pull request #10127 from vipulnsward/each_to_each_value

each to each_value; remove unused vars
Avoid iterating over records hash when not necessary

If the reflection scope is not flagged with distinct value, there is no
need to iterate over the records, so we avoid that by doing the check
before iterating rather than inside the iteration block.
Minor AR changelog improvements [ci skip]
Remove unecessary variable call, `#sort!` always returns an array
Remove unused block parameters
Merge pull request #10131 from Agis-/metal_helper

Remove unecessary variable call since `sort!` always returns the sorted array
Merge pull request #10130 from Agis-/patch-2

Mark unused block parameters.
Merge pull request #10122 from wangjohn/adding_documentation_to_form_builder

Added documentation to the FormBuilder class

Closes #10115
Merge pull request #9604 from sgrif/live_streaming_exceptions

Exceptions raised when using ActionController::Live cause server crash
Grouping thread locals in the ActiveRecord scopes so that the
current_scope and ignore_default_scope locals are brought together under
a registry object.
Merge pull request #10135 from wangjohn/grouping_thread_locals

Grouping thread locals in the ActiveRecord scopes
Mark unused variables and make some style fixes

It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
Merge pull request #10143 from Agis-/mark_unused_vars

Mark unused variables and make some style fixes
Creating an object to consolidate thread locals which hold the
instrumenters for the AS::Notifications module.
Merge pull request #10145 from wangjohn/instrumentation_registry_creation

Consolidating thread locals in AS::Notifications