Mechanism of transhydrogenase coupling proton translocation and hydride transfer