CRM-21753 - addition of json validation
Per https://github.com/civicrm/civicrm-core/pull/11658
the dedupe code has a mechanism to handle a nuanced array of criteria.
This PR is purely to support the passing of that json through the url criteria with
a proposed validation rule.
The criteria in the url might look like
criteria={"contact" : {"first_name" :{"IN" : ["Peter", "Paul", "Mary"]]]}
This is passed to the contact api to limit the contacts to look for matches
for (before actually finding the matches). In discussion the biggest risk seemed to
be the possibility of chaining so I have added a filter on the
criteria & set check_permissions (acls are applied in the next step but
having it on the api call is clearer & may reduce matches for the next step).