Generation and termination of runaway electrons at major disruptions in JT-60U