fix($compile): remove comment nodes from templates before asserting single root node

The compiler will no longer throw if a directive template contains comment
nodes in addition to a single root node.

The comment nodes will be removed before processing.

Closes #9212
it looks like the global `splice` was removed at some point. I can re-add it if that's better