Fixes for the GUI tests tearDown() method.
All wx events are now flushed before the deletion of GUI elements.
Authored by: bugman 2012-06-05
Parent: [r16664]
Child: [r16666]