Active layer nitrogen doping technique with excellent thermal stability for resistive switching memristor