r21976: make use of tdb_*_bystring() and string_term_tdb_data() in lib/