db: Initialize datum before use

It was possible for a value to be used prior to initialization so fix
that and add some helpful logging.
shared: Allow for multiple user type dbs

Previously all user type dbs were hardcoded to be of name user-<uid>
making any additional user dbs ignored by buxton even if the dbs were
specified in the configuration file.

Change this by using the same convention as system dbs, using the
layer_name-<uid> convention of db file name.
test: Fix check on incorrect variable