MutationObserver: Fix issues related to shadow dom

This adds more tests of more cases. This now also tests that we do not get
any spurious mutation records when we render the shadow dom.

Review URL: https://codereview.appspot.com/22200047