Enable the use of template inheritance for exporters

This is the first step to fix #370

It only enables the use of template inheritance, see
http://jinja.pocoo.org/docs/templates/#template-inheritance

The actual templates are not touched yet. The current templates are still working and can be ported step by step to use template inheritance.