Mechanisms of catalytic reduction of CO2 with heme and nonheme metal complexes