Fixes for console

* Check for __name__ == '__main__'
* Log out user when shell terminates
* Prevent inclusion of empty module names
* Catch sys.exit() and other exceptions that terminate shell
* More descriptive error messages when imports fail
Implement colors in input()
Allow console to be run from other scripts
Add wikibot.__main__ (helper)