Ensure crash handler works even when app isn't fully configured yet.
In such a case, the ipython_dir may not have been computed yet, so we
must avoid calling isdir() on a possibly None variable.
* Added 'started_listening' and 'stopped_listening' signals to QtKernelManager. The FrontendWidget listens for these signals.
* Created a metaclass to permit inheriting from both HasTraits and QObject
* Made 'continuation_prompt' a protected variable of ConsoleWidget for API consistency
* Made FrontendWidget's constructor consistent with QWidget conventions.
* Added a function for spawning a localhost kernel in a new process on random ports.
* Refactored the prototype kernel's 'main' function
* Gave IPythonWidget a (slightly) better 'main' method.
* Fixed bug in CompletionLexer where a context would be generated for, e.g, 'foo('.
* Added unit test for this bug.
* Cleaned up and documented CompletionLexer.