Emit console error messages in Selection.addRange().

The focus of this patch is to get rid of IGNORE_EXCEPTIONs in fucntion calls of
Range::compareBoundaryPoints(). To do so, this patch adds a bunch of checks of
preconditions, which should cover all the cases where compareBoundaryPoints()
may throw a DOM exception.

As an added bonus, this patch adds console messages which will be displayed
when there is a violation of these preconditions. I originally thought we could
throw a DOM exception in Selection.addRange() as well, but gave up the idea
because I thought it might break the web in an unexpected way.

This is a preparation patch of fixing "merged ranges" case of
Selection.addRange(). The last half of DOMSelection::addRange() is still a bit
messy, but that will be addressed in a later patch.

BUG=346613

Review URL: https://codereview.chromium.org/198723003

git-svn-id: svn://svn.chromium.org/blink/trunk@169328 bbb929c8-8fbe-4397-9dbb-9b2b20218538