Clean up State API.

Now that State is moved out of Browser, clean up the API, pull out
related tests, make sure everything is covered (new tests), and
generally prep State for use throughout the app.