Updated to 'shrink-wrap' the popup actions

The popup shrink-wraps the actions (ie is no longer full-screen width)
If possible, the popup will center itself horizontally over/under the
target element.  If not possible, then it will get as close as possible,
and offset its pointer to point at the target element.