ractivejs/ractive — pull request #1606 by evs-chris (2014-12-24 20:54:30+00:00)
Title: Make sure binding attributes work for templates that get rendered more than once

When I originally added this, I sort of assumed that templates were not used more than once, though I'm not entirely sure why. Having the same template used more than once had the interesting effect of only making binding attributes (lazy,twoway) on elements only apply to the first render of the template, since processing directives removes them from the attributes hash. This moves the recording of lazy and twoway attributes to the template instead of the element. This doesn't affect pre-parsed templates unless you pull the template after it has actually been rendered, in which case, it will have `bindingAttributes` keys for elements.

Also, this makes sure lazy event handlers are removed correctly.

Would appreciate a quick review to make sure this is OK when someone gets a spare cycle.