Bug 1014686 - [Messages][Refactoring] Improve "html template string" to "dom node\fragment" conversion. Added Template.prepare method

This seems overly complicated to me. For all the apps using interpolate(), you've just made that function do an extra object creation and take slightly longer to execute.  Why not just leave interpolate() alone and add a toDocumentFragment() method that calls interpolate and then does this template creation and innerHTML setting?

You don't actually have a use case for calling prepare() once and then calling toDocumentFragment() multiple times on it do you? I expect that to be uncommon. And if necessarying the calling app could do the cloneNode() as necessary.