Improve robustness of virtual selection around collapsed whitespace

An individual range may have no client rectangles if it is not visible
on the screen. In text nodes, this often means a sequence of collapsed
whitespace, or discarded whitespace at the start or end of an element
with "display: block" properties (e.g., p or HTML div).