Eliminate ThreadLocal use (#10292)

Pass compilation context around in traversal to eliminate implicit
context and related ThreadLocal.

Change-Id: I5dd356031d451ce72ef1be11d1c688a08aca5324