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.
rails commands even if bin/rails is a gem stub
script/rails could never be from bundler
need to delete bin, not binstub, update wording
fix binstub typo
Added documentation to the FormBuilder class, should help
clarify issue #10115. Also made the field_helpers an explicit list of
methods.
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
Add TEST_DIRS enviroment for constrain test directories in rakefile
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
Delegating the value getter and setters in the ScopeRegistry to the
current ScopeRegister object.
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