Write a jinja2 template loader #5289
Run apt-get update in travis build

This is required so that there are no errors while fetching
some packages like openssl
Also, Disabled C compiler optimizations for lxml to speed up test builds