Updated commands to use new "inputs".

Now that @robru added "inputs" for commands it has become much more
efficient to automatically get certain data, like session text, cursor
position, preferences etc. This commit updates all existing commands to
use these.

Also, it factors out the "inputables" and makes them externally
definable using sandbox.defineInputable() (see config.js and editor.js).