Issue #285: log performances of script
* logs normal views and json API perfs
* logging works only in DEBUG mode and with the PERF_CHECK constant set to True
Merge pull request #286 from pascalchevrel/issue-285-log-script-perfs-in-dev-mode

Issue #285: log performances of script in views and json API in dev mode