util_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.c