Since NtCreateThread returns STATUS_ACCESS_DENIED on win8+, we implement a solution for internal nudges using NtCreateThreadEx. We already have support for varying who frees the stack in NUDGE_NUDGER_FREE_STACK, which we leverage here. The other complication is who frees the arg_buf for a remote process (since we can't easily put it on the stack): again, we already have NUDGE_FREE_ARG which we use here.
We also fix a bug in cleanup_and_terminate that results in a double-free of a nudge dstack: a simple 1-byte-bool error where our asm checks all 4 bytes. A similar asm bug found by inspection with sig_should_swap_stack() is also fixed.
This fixes internal nudges. Client threads and external nudges will be fixed separately.
Issue: #1309 (closed), #1432 (closed), #2835