WORM and bipolar inkjet printed resistive switching devices based on silver nanocomposites