Frontend work for notebook templates.

This follows more or less the same structure as the backend does --
for each template model/view, we have a corresponding model/view for
instances of the template. These are all hooked up to the backend, so
we have full functionality now.