CRM-12638, use query instead of cache table if 'select all' option is uses

----------------------------------------
* CRM-12638: Optimize Prev/Next Cache and search interaction
  http://issues.civicrm.org/jira/browse/CRM-12638
CRM-12638, fixed group status

----------------------------------------
* CRM-12638: Optimize Prev/Next Cache and search interaction
  http://issues.civicrm.org/jira/browse/CRM-12638