getActiveShell() returning null even though some shell is active

This happens on some platforms (e.g. gnome 3) in some situations and cause lot of tests to fail.
Possible solution is to iterate through all shells returned by `org.eclipse.swt.widgets.Display.getShells()` and return last visible shell.