chore(case/context): set case execution context on thread local

... and provide context switch to call custom code.

related to CAM-2239