terminal.js:  Fixed the bug where things like Application Cursor Key mode would override the selected keyboard input mode.  These two settings are now stored independently of each other so there should be no more inadvertent overriding of modes.