Integrate syncrun_t into threadcontext_t

Function syncrun_maincontext() returns a pointer to the
syncrun_t singleton of the current thread context.