Fix "Exception ignored in:" warnings.

Fixes #245.
Log uncaught exceptions to debug log
Get rid of dotted_getattr.
Clean up simple_split.
Work around pylint bug in tests.

See:
https://bitbucket.org/logilab/astroid/issue/36/attributeerror-starred-object-has-no
Fix getting last main window when it was closed.

Fixes #242.