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.

Instead of placing this vile in the `lib` directory, it should be placed into the `components` directory under a new `tooltip` directory. This would be more in line with how we are structuring things in the visualization library.