Jinja renderer, timezone module/state fixes (2014.1 branch)

**This will likely have a merge conflict with #12729.  If that PR is merged first, ping me and I'll rebase and fix this one.**

This is #12724, backported to the 2014.1 branch. Only merge this if #12724 is merged and doesn't break tests.