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()`.  Additionally, I changed that function to
call `deliver()` on widgets in templates.

Correspondingly, I changed `Widget` so that if `buildRendering()` returns a function, `Widget`
will call that function from `refreshRendering(`).

Also did various simplifications to template.js, like passing in `document` and `register` parameters to the `buildRendering()` method.

Fixes #227.