Add logging mechanism

Provide simple mechanism for logging messages to stderr.  Messages have
an associated level which is compared to the verbosity state.  If the
current verbosity is not high enough, the message will be squelched.
Integrate debug mechanism

Add command-line options for adjusting logging verbosity.  Specifying
-v increases verbosity by one level, -q silences all logging.
Switch current logging to new mechanism.