Resistive switching memories based on metal oxides: mechanisms, reliability and scaling | Synapse