Implement elementFromPoint for document and ShadowRoot

This uses the algorithm from the ShadowDOM spec to ensure that elementFromPoint enforces the upper boundary encapsulation.

Fixes #122