Alter database API to suit returning whole structs

This has most benefit in the gdbm backend where we store the entire struct
and union member in the database with no modification.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>