Performance: Leverage jinja2's Environment to cache compiled Templates.

Fixed issue #280.