Mechanism of the formation of dihydrogen from the photoinduced reactions of poly(pyridine)ruthenium(II) and poly(pyridine)rhodium(III) complexes