CRM-13274, search builder fixes

----------------------------------------
* CRM-13274: Sort by pseudo-constants is broken for search builder
  https://issues.civicrm.org/jira/browse/CRM-13274
Merge pull request #3087 from kurund/search-builder

CRM-13274, search builder fixes