Use last focused window for download errors and other stuff.

When the event happens, it's possible we don't have any window focused yet, so
we display it in the window which was last focused.

Fixes #191.
Make srcmodel public in CompletionFilterModel.
importer: Add vim modeline
importer: Use with-block to open file.
pylint_checkers: Fix getting encoding argument.