[SPARK-1870] Made deployment with --jars work in yarn-standalone mode.

Ported from 1.0 branch to 0.9 branch. Sent secondary jars to distributed cache of all containers and add the cached jars to classpath before executors start.
This actually returns a one element `Array("")` if there are no secondary jars. We should `.filter(_.nonEmpty)` after splitting.