Always upgrade the final whitespace in inserted text

The final character of inserted text must always be upgraded
on insertion, and conditionally downgraded post-insertion.
This covers the situation where a space is inserted as the last
character in a paragraph. In this instance, the space must be
a space character so it isn't discarded as trailing insignificant
whitespace.
Improve space selection rendering

Groups of spaces will be represented with space character elements which
are not considered or returned as part of the fetched text nodes. This
logic has now been adjusted to fetch all text elements, which will return
non-text node character element as well.
Draw selection overlay over space characters when selecting backwards

Selections going backwards (to the left in a LTR language) were not
allowing character elements such as spaces to be selected, as the
selection view was incorrectly using the right-side of the selection
rectangle.

Unfortunately, in Chrome, a collapsed selection reports a width of 1px,
and using the left-side produces a rather odd looking overlap on the
previous character. To workaround this, the rectangle calculation now
uses the bounding client rectangle instead.
Hide selection overlays for a region selection

A region selection is made when the user clicks directly on an image or
another object that will have a custom frame drawn around the target. In
this case, the selection overlay should not be drawn on top.