Fix bugs in when to invoke Custom Element entered, left callbacks.

Custom Element entered, left document callbacks are only meant to be
invoked when entering or leaving documents with a view. The condition
checked whether the document had a view, but not whether the element
was *in* the document.

Additionally, the placement of the condition was wrong, and no
callbacks were invoked when a custom element entered a document as
part of a Shadow DOM subtree.

BUG=266656,266733

Review URL: https://chromiumcodereview.appspot.com/20717003

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