Pectin-assisted one-pot synthesis of MoS2 nanocomposites for resistive switching memory application.