Batch updates caused by handlers in multiple roots

Fixes #1227.

It seems rare that event handlers in two roots nested in the DOM will update the same component in the same tick, but if that happens, the updates should be batched together.
Merge pull request #1231 from spicyj/gh-1227

Batch updates caused by handlers in multiple roots