Use frozen hash keys in threaded.rb

Expand on a2586f0. Use frozen hash keys in ```threaded.rb``` to avoid dup and freeze.