Grouping thread locals in the ActiveRecord scopes

I'm grouping some thread locals under a registry object so that we can try to get the thread locals under control. I've brought the ``current_scope`` and ``ignore_default_scope`` locals together into a single object.

Accesses to these thread locals are now governed through the ``ScopeRegistry`` object.