CRM-14263 - search profiles from search builder not working

Conflicts:
	CRM/Contact/BAO/Query.php
	tests/phpunit/CRM/Contact/BAO/QueryTest.php
	tests/phpunit/api/v3/ContactTest.php