Fixes a bug in PR #4703 where for post-CreateUserProcess handling it frees the heap buffer for a CONTEXT before the code is finished using it.
Also updates the CONTEXT heap buffers from PR #4703 to use thread-private heap where possible, to avoid locks.
Issue: #2666 (closed)