s3:lib: split things into a conn_tdb.h