Only downgrade spaces following non-whitespace characters

Alternate space elements were being incorrectly downgraded, making every
second space a literal character rather than a space element as is
necessary.
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.