Add logging

An incomplete logging implementation. I'm opening this pull request so it doesn't get lost :)

Initially, this only logs a couple of things (depending on log level):

 * failed partials lookups
 * template cache misses
 * template compilation

See #112 for impetus.

Still to do:

 * performance testing — ensure that this doesn't materially impact performance
 * test coverage
 * documentation