server: try harder to keep database intact
server: try harder to keep database intact

After a sudden unexpected stop, the database ended up irretrievably
corrupt. It seems to hang around with the disk in an inconsistent state,
so lets make it stop that.

douglasbagnall/sonograms,douglasbagnall/sonograms