CRM-12738 - Handle ampersands in REST API params.

Should be reviewed in case we need to pick up other special characters. Pretty sure I recall testing a more general solution and finding that I needed to *not* just urlencode() the values in $params.