Squash master to REL1_22 + compatibility patches

Fix ApiOpenSearch aka prefix search in the absence of ApiBeforeMain.
BetaFeatures won't work for this but at least it'll work at all.

Remove support for indexing file contents as that depends on changes in
1.23.

Change-Id: I3d4160531de03034446b9527a5710e535548f388