tdb2: cleanups for tdbtorture, add more debugging and -S flag.