Fixing officers patch by making Group#delete_cache_for_officers_group more efficient.

Trello: https://trello.com/c/oriKIGdx/693-amtstrager-struktur-ausbauen
introducing read-only mode.

This can be used to avoid maintenance mode when performing long
database operations that would lock the database.

Start this mode by touching the file `tmp/read_only_mode`, end it by
deleting the file.