Renamed the key_data functions for getting all key states and keeping them in the object, also removed the check to return error if not one of each key state has been found.
In key_data_cache_key_states() check that we have not already fetched the key state, if so return error.
Add key_data_cache_hsm_key() and key_data_cached_hsm_key() to key_data object.
Update *_reset() in database objects, no need to NULL if values are not set.
Reset result list size when db_result_list_fetch_all() is called and its about to fetch all.
Corrected documentation for db_result_list_size().
Add a *_list_size() function to all database objects