Creating a module so that per thread registries can be easily created as
thread local variables.
Created a runtime registry for thread local variables in active record.
Changed the ScopeRegistry and the InstrumentationRegistry to use the
PerThreadRegistry module.