Enable dependency injection

This is done via `make_renderer` which constructs a Renderer object,
whose `__init__` method no longer has logic. `make_renderer` is a
factory function which gives users the convenience of the old `__init__`
but improves testability.

This commit also simplifies logging to use a regular logger, rather than
the Flask logger, which would not enable DI.