Add a database layer count to count objects, no interface in the database objects yet.
Add a *_new_copy() to all database objects to create a new object directly as a copy of another.
Added db_result_list_fetch_all() and *_fetch_all() to database object for fetching all object into memory.
Reintroduced *_begin() (and added *_get_begin()), it can now be used to iterate over a list multiple times
if *_fetch_all() has been called and also changed the behavior of db_result_list_begin() to reflect these changes.
Added a few more checks to *_next()/*_get_next().
Added db_result_list_size() for getting the size of the result list if supported by the backend.
Changed hsm_key key_type into an enum.
Updated all test to reflect changes.
Removed a TODO.