Add `before tohtml` event

When I first added this event it felt a bit hacky and dirty - but it's actually turned out to be really useful as a way of hooking into the data model to add / manipulate data before rendering.  (On initialize doesn't really cut it for data that changes and gets re-rendered often and the `before render` event *only* runs on the fm module that is being rendered - and doesn't get fired recursively over all of its children)