input: split off some code from input.c to separate files

This is mostly just moving code around.
input: cosmetics: move code around

Rearrange the code in an attempt to make its organization more logical.
options: simplify handling of some help options