shared: Assert size is correct

Only invalid data could make the size smaller than minimum.
db: Fix bug in get and set value interaction

Story time, gather round the fire. Because many buxton direct functions
make use of buxton_direct_get_value_for_layer, get value for layer was
being overloaded. Sometimes failure meant no value, sometimes it meant
value but not the right type and sometimes it meant the layer name was
wrong.

Because of this overloading of the get value, without having error codes
and just boolean values to make sense of the return, set value was taking
false to mean doesn't exist when it could have meant wrong type or wrong
layer name. In the case of wrong layer name, no harm is really done as
set value will then fail for the same reason but in the case of wrong
type the old value would get changed and the type would be changed, double
bad!

To fix this, buxton modules have learned about error codes and will now
propagate the reason for failure. This change caused most of the
buxton_direct functions to need to updating to handle error codes as well
as fixing some assumptions that were made because get value didn't
distinguish failures.
shared: init_backend should either abort or succeed
shared: backend_for_layer should never fail

As long as we have a valid layer name (which should be obtained before
calling backend_for_layer through the layers hashmap), backend_for_layer
should not be able to fail so assert we get a return.
db: Don't always remove the group for unset_value
core: Validate and set key type from client
core: Improve logging