If the user directly closes the settings window without triggering the
custom command Textfield's onEditingFinished (via unfocus or pressing
enter), the custom command may not save. This change adds a listener to
the Textfield so that if the settings window closes, the change will
always be recorded.
Rather than starting ksession right away, PreprocessedTerminal now waits
for ApplicationSettings to finish loading custom command settings from
storage. If a custom command is specified, PreprocessedTerminal will
tokenize it and pass it onto ksession as a shell program similar to the
-e option. If both a -e command and a custom command is specified, the
-e version overrides the custom command.