Introduce Position::inDocument()

This patch introduces Position::inDocument() to replace Position::anchorNode()->inDocument() for shorter code pattern and safety for avoiding null reference.

BUG=n/a
TEST=n/a; no behavior changes
R=tkent@chromium.org

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

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