Adds invocation of the client restore state event for all cases, even when the register state is known to already contain application values, since the client may need to restore memory.
Adds a test to drwrap-test-detach by adding a system call.
Issue: #4197 (closed)