adds logging based on glog, refactor cli.

adds usage of glog for logging, with soaringweb starting to use it.

refactors the flag definiton for the cli commands so that the glog flags
are also taken into account.

Fixes #34.