Rewrite all "LIKE" queries on civicrm_prevnext_cache

We can't afford to be this sloppy.

Anyway, wish us luck keeping this in sync with upstream changes.

Change-Id: I2197b847ad8c272230ec4595f23efedeae8edd0c