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
please don't use single line `if`s. using proper blocks makes it easier to refactor the code in the future and makes code diffs easier to read.