Optical and electrochemical properties of 3D nanoporous Cu2O–Cu inverse opal structures tuned by electrodeposition