Heterogeneous and Homogeneous Nickel-Based Electrocatalysts for Oxygen Evolution and Carbon Dioxide Reduction