Add api-readonly switch

This disables all JSON-API-level changes to backend data.
Merge pull request #1313 from zeha/api-readonly

Add api-readonly switch