Refactoring of the key input system. InputStreamHandler gots replaced
with a much more declarative and powerful key binding system.
Added support for the PYTHONSTARTUP environment variable.