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

nit: I'd rather either create these nodes in a setup, or even generate the 2 templates html/css in a setup; so that we're sure they're brand new at each test.