8047149: Enhance thread contexts in core libraries

Reviewed-by: alanb
10 files changed