Electrochemical utilization of metal hydrides