The rise of Jinja

This PR isn't quite ready yet -- it's got a lot more work ahead of it -- but I wanted to open it early to give you an idea of what I was thinking to see if you had any initial comments.  I've started mainly by moving the logic of buildjs to the external templates (yeah the code duplication between `page.html` and `content.html` is bad, I'll be fixing that shortly.)  

The general end goal will be that pretty much all of the actual javascript strings in the charts themselves will be moved to templates.

What are your thoughts?