Added Thread Local Storage
Merge branch 'yaafv2' of github.com:LeanderBB/YAAF into yaafv2