cachedb_sql: fix pkg memory leak

When fetching a key, the db_res_t structure would not be properly freed.
(cherry picked from commit e5ccde131eb72debd9aa400ced2e1e31bd61612d)

Conflicts:

	modules/cachedb_sql/cachedb_sql.c