[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.
This line is underindented relative to `filter`; I'd move the `filter { case (k, v) => ` to the previous line, and the matching brace to the next line.