Refactor how popup repositioning is called.
Move the smart positioning functions to be methods on NGAnnotatePopup.
Refactor popup positioning so we know which side it's positioned on in addition to its pixel position.
Fix the popup and tooltip arrows for positioning on all sides.