Changed localProperties to use ThreadLocal (not DynamicVariable).

The fact that DynamicVariable uses an InheritableThreadLocal
can cause problems where the properties end up being shared
across threads in certain circumstances.
Merge pull request #926 from kayousterhout/dynamic

Changed localProperties to use ThreadLocal (not DynamicVariable).
Merge remote-tracking branch 'origin/master' into branch-0.8