CMB-82: ContextualPopup: Support preferred direction and preferred width

Direction property is added to the Contextual Popup
1. The direction properties  can be "top, left, right, bottom". The contextual popup will take the position set if available space is there.
2. Used same functions as in Contextual Popup Layout, "getViewHeight, getViewWidth, applyPosition, getBoundingRect"
3. The Popup margin 20 is hard coded in the alterDirection() function