Avoid thread locals

There are bugs in the handling of thread locals.  This pull request replaces two thread local maps with non-thread local TBB concurrent unordered maps.