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 degradation. This requires some investigation.  

- `.isNotEmpty()`
- would `querySelector()` be faster - we need to find at least one, not all