Implement most of the web handlers.

One more template needs to be written. The last big chunk is the CLI tool to
activate a cert.