tdb2: rework free.c functions to return enum TDB_ERROR.