Add some tests to verify that SchemaState is flushed when indexes come online

The behaviour is already correct in this regard. This PR just adds assurance that we don't break this in the future.
it looks to me like there could be a race between committing `"between"` to the schema state, and the index coming online...