Simplify thread static management for AgentEnvironment.
Merge pull request #2 from adbre/static

Simplify thread static management for AgentEnvironment.