Fix unit test which could crash
Fix unit test which could crash

We were trying to close a window on a non-STA thread after the test had
finished executing, which was evil.

Threading is hard.

canton7/Stylet,cH40z-Lord/Stylet,cH40z-Lord/Stylet,canton7/Stylet