[SPARK-3540] Add reboot-slaves functionality to the ec2 script

Tested on a real cluster.