added a changeState event to interact with the state object instead of using viewNavigate

#### To QA

Load the gui using the `state` flag.
The charmbrowser should load.
Click a charm, its details should open.
Close the details,
Click a bundle, its details should open.
Close the details.
Perform a search
Click one of the results, its details should open.