Fix multiple file QWebPage extension.

We accidentally broke that in 4c78b611ebb6e5db1e07f86e66d92be3f2c4caab.
Clean up Command.
Split getting of completion model into multiple functions.
Remove unused imports.
Clean up run_checks a bit.