Add unit test for remembering regexp state for Find Next after search bar is closed.
Also refactors out some common code from the case sensitivity test.