fixes to CpkEndpoint

In CpkEndpoint:
- Adapted success/failure callbacks (a result with json.result=false launches the failureCallbacl)
- Added mimeType to ajax requests with json datatype (shuts up Firefox messages :"not-well formed")
- Adapted parameter substitution