Novel 3D random-network model for threshold switching of phase-change memories