[SPARK-5006][Deploy]spark.port.maxRetries doesn't work

https://issues.apache.org/jira/browse/SPARK-5006

I think the issue is produced in https://github.com/apache/spark/pull/1777. 

Not digging mesos's backend yet. Maybe should add same logic either.
If we just switch this to a `def`, then do we need the system properties changes, too?  Or will just making this a `def` be sufficient?  I'm just a bit wary / skeptical of code that uses system properties because I just spent a bunch of time cleaning up uses of properties in tests: #3739.