shared: Update direct to show db change error messages
db: Fix read only layer implementation

There was a mistake with checking errno vs gdbm_errno. Also the read
only change did not account for later attempts to set or unset on the
same layer. Such attempts would have caused buxton to crash buxton or
given an incorrect error message. Fix these by checking the gdbm_errno
for specific failure causes.