Call OnExit on the wx thread.

Fixes test runs hanging indefinitely raising a bunch of PyDeadObject exceptions.