Refactor changeset state into GraphQL API
Created by: eseliger
We've had quite some effort to do in the frontend to map all the internal states on a changeset onto something that makes sense for the user. Now that I needed to touch it again to add a 'retrying' state, I figured it's about time to do the refactor: Introduce the changeset state as a first-class citizen in the GraphQL API, which also allows to use it directly for filtering.
Closes https://github.com/sourcegraph/sourcegraph/issues/16009