Add api-readonly switch

This disables all JSON-API-level changes to backend data.

Intended use: on slave servers using NATIVE replication, where modifying the backend data would be harmful to the database replication.