Use template inheritance

All of the HTML pages use template inheritance now -- they all come from a common layout "lib/layout/default.html"; we pass data to the layout using django template blocks. 

@kfang this touches like all of the ui so you should probably take a look at it