Resistive switching – from fundamental redox-processes to device applications