Fix EZC usage of ThreadLocal and clarify ThreadLocal comments

Summary: I inappropriately had EZC's TSRM layer create ThreadLocal objects as
true globals, instead of using DECLARE_THREAD_LOCAL and
IMPLEMENT_THREAD_LOCAL. This caused a crash since the variables were
meant to be thread-local but weren't. Fixed this, and clarified and
expanded the comments in thread-local.h to address the origin of the
error.

Also:

* Fixed some whitespace and namespacing issues in this code, along
  the lines of my previous EZC commits.
* Fixed a bounds check in ts_free_id().
Closes #3120

Reviewed By: @ptarjan

Differential Revision: D1422510

Pulled By: @fredemmott