Support xterm's `modifyOtherKeys` option for keyboard input

Full details in this PR: https://github.com/gnachman/iTerm2/pull/256#issuecomment-263117368

This should be implemented in code.