NH-3402 - Refactor ThreadLocalSessionContext