C++-ified the client configuration

We copied some of the server configuration object to the client version,
adding writing of files, and some command-line flags.