Various optimizations of template code,
including passing in document and register parameters to buildRendering().
Refs #227.
Changes to make templated widgets align with Invalidating:

- make deliver() immediately update the DOM, even when the template contains widgets
- make computeProperties() run before the DOM is updated

The changes center around the function to update the DOM after widget properties
are updated.  I changed this function to be called from Widget#refreshRendering() rather
than making a separate call to this.observe().

Correspondingly, I changed Widget so that if buildRendering() returns a function, Widget
will call that function from refreshRendering().

Fixes #227.