Tests: Move logSegmentsState to shared location, and remove no longer
needed verbose logging from upgrade test.