Wait for the reply from the 'D' detach packet before tearing down the debugger.  Avoids a race
condition where we could end up killing debugserver (and thus the target) before it had a chance
to detach.
Also fix debugserver to send the OK AFTER it detaches to avoid the same race condition.

<rdar://problem/16202713>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@205043 91177308-0d34-0410-b5e6-96231b3b80d8