Nanoscale resistive switching and filamentary conduction in NiO thin films