In situ generation of silver nanoparticles in PVDF for the development of resistive switching devices