Major state refactor.

Replaced ('panel', 'left', 'right') with ('panel', 'focussedNode').
The focussedNode is a node id. 'panel' is the location of that focussedNode.

Attention: while the state is now more clear now, there are some
disadvantages too. Atm. a panel toggle deactivates the focus of the resourse.