Call OnExit on the wx thread.
Fixes test runs hanging indefinitely raising a bunch of PyDeadObject exceptions.
Merge pull request #838 from whirm/fix_remotesearch_test

Call OnExit on the wx thread.