switch layout to precomiled jst templates

This change makes the layout module use jst templates for the header
and footer part of the page. Remember to precomile the templates using
grunt jst before testing the ui.