Parametrization of all #defines, constants, and hard-coded values.

The server and database can now be fully parametrized through a
configuration file or command-line arguments.