Fixed #18773 -- Add logging for template variable resolving

Added a django.template logger with a default null handler.  Added
logging if there is an exception while resolving variables in a
template. Added corresponding tests and updated logging
documentation.
unused?