rqt_runtime_monitor: Fix selection permanence across state transitions

We need to use the tree to set the current item, and the was_selected logic was broken, too