MediaWikiTestCase: Centralise insertPage() logic from SearchEngineTest

Make it re-usable for other tests and update SearchEngineTest to
use the addDBData (which is called automatically) instead of
manually keeping track of the state.

Change-Id: I75a6951545d9824e71e00f0f96936c53b400dce6
Merge "MediaWikiTestCase: Centralise insertPage() logic from SearchEngineTest"