Support for raw_input and refactor of PNaCl kernel Python code

Makes front end support for raw_input more like IPython (text box in outputarea, rather than modal dialog) and refactors the Python code in the PNaCl kernel.  This refactoring allows for support for raw_input in the PNaCl kernel, and will allow for interrupting the kernel in the future.