Fix process-dies-after-detach

 - Need to flush pending kernel-side events

 - I realized that while we're detaching, we want to pass exceptions
   down to the inferior with DBG_EXCEPTION_NOT_HANDLED, instead of
   losing them.  I ended up reusing a bit of code from the Linux
   target.

Change-Id: Ifaa96b4a41bb83d868079af4d47633715c0e1940
4 files changed