Use smart positioning for the tooltip too.
Fix some positioning scenarios.
The tooltip will now first try to position itself above or below the annotation before trying to the left or right. (Popup is still left/right before above/below.)
Make the Popup factory reusable for tooltips too, and make it use an arguments object.
Set user-select:none on tooltips to they won't get in the way of other annotations triggering other tooltips.