Move the various getDirectChild functions to DomUtils.getDirectChild.
Merge pull request #448 from vandenoever/getdirectchild

Move the various getDirectChild functions to DomUtils.getDirectChild.
Re-implement paragraph & document selection using step iterators

Changes in adjustSelectionByNode logic fixes extend-by-paragraph
problem (issue #335).
Crop range selection to the anchor root

Fix an unhandled case if the anchor and focus points of a range were in
two separate roots. The select range logic will now clip the range to
the closest valid edge within the anchor's root.