Use cmdliner for command-line parsing and manpage generation

Note this needs an init.d script change.