Adds a UI test for title bar button clicks

The following procedure fails transiently on Winforms:

```
var win = [some window];
win.TitleBar.CloseButton.Click();
```

It is more likely to fail the simpler the form is. An empty form fails constantly while the current Winforms test application, with the test in this pull request, fails once every few test runs. It would seem like some kind of wait is missing, if it is at all possible to wait for the moment when the window is fully responsible.