Allow directives to register finalize callbacks.

In cases where the directive wants to wait until all of its children have
been compiled before finalizing some state, this mechanism can be used to
get notified.
Flesh out the decorator directive API.

Decorator directives have pre- and post-link functions that make them
ideal hosts for services, since they can establish link-time state during
pre-link (which runs before child nodes are linked) and then clean up
that state during post-link (which runs after all of the child nodes are
complete).

There is a remaining wart here in that this mechanism doesn't work
properly with component directives that produce more than one node. This
will be fixed with a change to the component directive API in a separate
commit.
Add thi-switch directive construct.

This is the first multi-directive construct created using the services
mechanism. thi-switch establishes a context where the value of a
particular expression can be switched on, and then child directives
thi-switch-when and thi-switch-else use that context to show only elements
that relate to the active state.

In this initial version the 'when' expressions are required to be
constant, but this may be relaxed in a later revision.