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

In some case, we need specify port range used in spark, such as firewall.
@scwf I think you need to pass through 0 here. It has special meaning. Refer to the scaladoc. Aren't you just changing the 'else' branch here to start and end within a certain range, instead of 1024-65536 always?