jinja2 templates: Enable the 'do' and 'loopcontrols' extensions

See http://jinja.pocoo.org/docs/extensions/ for their documentation