Add thread local dict wrapper

Allows for thread local contexts.  Useful for web applications.