Bastion: wiring up ui state machine for nutupane.

Using a state machine to keep track of whether the "action pane" is opened, etc.
Merge pull request #2540 from waldenraines/bastion

Bastion: wiring up ui state machine for nutupane.