Fixed a race condition in turning off the emulator.
Fixed a race condition in turning off the emulator.

Problem: Clicking the `Turn emulator off` link kills the emulator, but the link text does not get updated to `Turn emulator on` on some systems. This was observed in Windows 8.1 x64.

Cause: The link to turn off the emulator kills the emulator process. There's a handler attached on process exit that updates the link text. But because the link handler would immediately dispose the `Process` object after killing it, there may not be sufficient time for the OS to callback into the Exited handler before the object gets disposed.

The fix here delays disposal of the `Process` object to the Exited handler. Note that now the `Process` object will not be disposed anymore upon application exit. But since our application process is being terminated, the OS will release its resources anyway.

bkoelman/DogAgilityCompetitionManagement