Don't set document.domain to an IP address fragment.

Remove duplicated logic in Document.cpp and force the decision-making into
the existing weborigin/ code which makes the decision properly.

Adds a setting to permit tests that rely on 0.0.1 being a super-domain of 127.0.0.1.

BUG=312489

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

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