CRM-15299 use buildClause function as often as possible so same params are supported
fix event handling of is_template (now cannot be NULL)
Merge pull request #4257 from eileenmcnaughton/CRM-15299-master

CRM-15299 stdise behaviour on search (as tested via api)