Update code-generator to use trigger-symbols

Global variable (integers) are attached to the AST that map each trigger
to its corresponding id number. The id is "__" ++ triggerName ++ "_tid".

Pushed all the way through the code-generator.

Also fixed some unseen issues with how we initialize our static
variables. Previously, all globals (both static and not) were
initialized in the __global_context constructor. This is not
thread-safe since there may be multiple contexts.
Statics should be initialized once before main.
Merge branch 'master' of github.com:DaMSL/K3-Core