UI|Client|PopupWidget: Added method for setting anchor and opening direction

Sets the anchor to the appropriate side of a rule rectangle.
UI|Client: Added a method for finding data context items
UI|Client: Added basic implementation for ChoiceWidget
Fixed|libgui|PersistentCanvasWindow: Applying command line options to window

At least on OS X there was a problem with the state of the widget
if the attributes were applied to a hidden window (maybe due to
changes being queued?).

Now the command line options are applied to the logical state.