Ensure that every Document has a single, distinct template content ownerDocument

This avoids several bugs where templates would erroneously share their content
ownerDocuments with themselves, leading to such badness as custom elements being
instantiated inside templates or template.content.ownerDocument.defaultView being
non-null.

Also cleans up various code in Document: templateDocument() is gone, with its callers
switched to the new isTemplateDocument() method, and setTemplateDocumentHost() has
been removed from Document's public interface, since it should only be set by Document
itself.

Spec bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23990
Relevant HTML spec change: http://html5.org/tools/web-apps-tracker?from=8350&to=8351

R=rafaelw@chromium.org
BUG=325442,342601

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

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