Electrochemically prepared oxides for resistive switching devices