[DevTools] Replace usages of document with custom functions.

This patch replaces the following document.XXXX functions with window.XXXX custom ones:
- createDocumentFragment;
- createElement;
- createElementWithClass;
- createTextNode.

BUG=424188

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

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