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.
Might consider using the console logger by default for this to be more useful. I don't think most people will configuration logging in development to enable it otherwise. On the other hand, I don't know if this would clutter up the runserver logs.