Explicityly close database sessions

This tries to close the session when the function is done with it to
avoid using too much memory.
Properly write an UTF-8 encoded output file

Write output using codecs.open() with the UTF-8 encoding. This also
introduces a consistency improvement in argument naming.
Provide function for template-based report rendering

This uses the Jinja template engine to produce the report HTML files.
This also renames the util module to output to better describe its
purpose.
Introduce a base template

This sets up the basic layout for the report. The plugins are expected
to supply a crawler instance.
Introduce template macros for rendering links
Switch plugins to use template

The sitemap module has been somewhat rewritten to use generators to
provide the structure of the website. The problems module has also been
simplified a bit.
Remove unused code

Most of this is removed because of the switch to the Jinja template
engine.
Use Jinja templates to render report

The switch to Jinja removes the need for custom escaping and Python code
to write HTML output and instead uses easy to read templates.

As a result of the switch, this drops more than 450 lines of Python code
while adding a little over 400 lines of HTML template code.
Add missing template changes from Jinja merge

This also fixes newlines in link meta information that were incorrectly
escaped.