Electrochemically prepared oxides for resistive switching memories