[SPARK-4449][Core] Specify port range in spark

In some case, we need specify port range used in spark, such as firewall.
No changed, here generate a random port in range (startPort, endPort)