ComputePopupFitInRect

Given information about a popup and the space available for displaying that popup, compute best placement for it.