Change the compiler to use template elements instead of comments for view ports

DON'T MERGE

Using template elements makes viewports queryable, so we don't have to walk the DOM ourselves and rely on querySelectAll.  It looks like the change causes a 10% performance decrease. This requires some investigation.