Collect directives from template elements.

Each element can have zero or one template directives, zero or one
component directives, and zero or more decorator directives. These types
of directive will be fleshed out and implemented in upcoming commits.
Allow directives and filters to be registered via methods.

Registering them in the initial call is bothersome because they will
usually depend on the parse, interpolate or compile methods of the
compiler object and thus there is a chicken-and-egg problem.

Instead, we now register them separately, and methods are provided to
register sets of directives/filters in one shot under the expectation that
a large application will have several sets that come from different
libraries that all need to get registered on the compiler.
Establish an interface for the different directive types.

So far only the TemplateDirective type is fleshed out and the rest are
stubs.
Establish a library of standard directives.

To start off we just have 'thi-if' and 'thi-repeat', which are both
template directives that allow zero-or-one and zero-or-more copies of
the child template respectively.
Fix index.js syntax.

This was messed up during some merging.
Provide mechanism to link and append a compiled template.

The compile method now returns a link function with an 'appendTo' method
that behaves like a node link function by accepting a node to append
the resulting nodes to.
Handle template directives.

When a template directive is present it short-circuits the other handling
of the element since the children of a template element are recursively
compiled as part of handling the directive.