Revamp handling of app state.

Before, React would sometimes re-use "old" components that would hang on to
an old version of the app state, for reasons I don't quite understand.

Now, just stick the app state in two plaes:

- a state field in the toplevel component (that gets React to update)
- and an atom in the props
  (actually used for access, needed to communicating downwards)