Pluggable templates.

Adds ability to plug functionality into templates. A plugin can have its
own created, rendered and destroyed callbacks, as well as define its own
events.

Example:

SimpleForm = function (options) {};
SimpleForm.prototype = {
  constructor: SimpleForm,
  created: function (template) {
    // this points to SimpleForm instance
  },
  rendered: function (template) {},
  destroyed: function (template) {},
  events: {},

  serialize: function () {},
  onSubmit: function () {}
};

Template.myForm.plugins({
  "someName": new SimpleForm({})
});
Add plugin helpers to template.

A plugin can define a helpers map and those helpers will be added as
handlebars helper methods to the template.

Example:

_.extend(SimpleForm.prototype, {
  helpers: {
    errorFor: function (fieldName, options) {
      return "Some error message goes here";
    }
  }
});