When nodes are added to the dom, they may need to be re-processed by a JS based
filter. To do this we need to trigger the legacy YUI event filter-content-updated.
To make this easier I added some wrappers to template that will insert the node, run any
JS and trigger the event.
I also changed existing yui code to call the amd function to trigger the event. This way
all jquery and yui listeners will always be notified.
* eqeqeq: We do not require use of ===
* maxlen: Coding style aims for 132 characters
* indent: 4 Characters (Helps some editors but does not warn in new version of jshint)
* undef: Warn about variables used before they are defined
* predef: Specify that we define the M variable elsewhere