testing: don't mess up the Selectino API
Add utility to read out the text of a range using the browser selection API
Enhanced test case to detect off-by-one errors on range normalization.

Now the test case also analyzes the created range by reading it out
via the browser selection API. This is needed to expose some problems
that are hidden otherwise. (Like whitespace sneaking into the selection,
because we are not selecting the right text nodes.)