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