httptest.ResponseRecorder exposes a bytes.Buffer which we were reading and writing concurrently to test streaming log APIs. This is a race, so I wrapped the struct in a lock with some helpers.