KMC Simulation of the Electroforming, Set and Reset Processes in Redox-Based Resistive Switching Devices