Upgrade custom elements when inserting a node

This patch tries to upgrade[1] custom elements when inserting a node[2].

With this change, setting to innerHTML/outerHTML enqueues upgrade
reactions if the definition is not null, but then
Element::insertedInto() enqueues upgrade reactions again. Added the
guard in CustomElementDefinition::upgrade() for such cases.

[1] https://html.spec.whatwg.org/multipage/scripting.html#concept-try-upgrade
[2] https://dom.spec.whatwg.org/#concept-node-insert

BUG=594918

Review-Url: https://codereview.chromium.org/2067853002
Cr-Commit-Position: refs/heads/master@{#400401}
6 files changed