test: add Selection still cleared assertions
index: use "dom-iterator" to implement queryState()

Now it's more rubust, in that it can traverse across
block-level elements, or multiple `<a>` nodes, etc.