The problem with InvalidOperationException was related to the fact that IsSelected was false when checked, but already becomes true until control flow reaches pattern execution. Hence instead of falling back to patterns immediately, we'll wait a bit to give mouse click a chance to be handled.
Made waiting for input idle tolerate already closed window situation
Cleaner solution for #186
Partial solution for WinForms ComboBox.

For some reason, in UIA v3 ComboBox doesn't expose ExpandCollapsePattern. Instead it has button "Open" which can be clicked. This change abstracts required changes away.
On Application.Close() instead of closing main window only it is better to close everything we can - there can be more than one window, e.g. in case of multi-threaded UI case.
Removed focus setting all the time