Tooltip placement

Fixes #1718 and #1721

Include the window in the "overflow" calculations, and use an unobstructed clone to measure the size of the tooltip.

Also included tests.

I would also create a `tooltip` directory here under `components` and move this test there.