#261 Added support for per-thread scopes
#261 Added support for per-thread scopes

Also, corrected conceptual errors about use of cx_threadTlsGet,
improved lazy instantiation.

cortexlang/cortex,cortexlang/cortex,cortoproject/corto,cortexlang/cortex,cortoproject/corto