Don't generate <span class="cm-"> nodes when token() returns only line-foo/line-background-foo styles.
Remove tests using getElementsByTagName

The method isn't present on all supported platforms, and these
tests tested someting very obscure, and already failed on the v4
branch which representes the editor content differently.

Issue #2152
Handle spurious spaces from token().