(dev/core#217) PrevNext - Allow swapping `getCount()` for purposes of contact-search
The `getCount()` function is used by both contact-search and dedupe-merge use-cases.
* Contact-search
* `CRM/Contact/Selector.php: $countRow = CRM_Core_BAO_PrevNextCache::getCount($cacheKey, NULL, "entity_table = 'civicrm_contact'");`
* Dedupe-merge
* `CRM/Contact/Page/AJAX.php: $iTotal = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, $join, $whereClause, '=', $queryParams);`
* `CRM/Contact/Page/DedupeMerge.php: $total = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, NULL, ($onlyProcessSelected ? "pn.is_selected = 1" : NULL));`
Our aim in developing `CRM_Core_PrevNextCache_Interface` is to allow contact-search to swap a MySQL
backend with a Redis backend -- and dedupe-merge should continue as-is (whether or not Redis is
available). This basically means:
* Contact-search switches to using `Civi::service('prevnext')->getCount()`
* Dedupe-merge continues using `CRM_Core_BAO_PrevNextCache::getCount()`
Note that the `Interface::getCount()` is simpler than the BAO's variant. This is good because:
* Contact-search doesn't need as many parameters.
* Dedupe-merge still needs all the parameters.
* Adding all parameters would make it hard to implement on other backends. (This is esp true of SQL-style options `$join` and `$where`.)