Self-templating faceted and spongy single-crystal ZnO nanorods : resistive switching and enhanced piezoresponse