[SPARK-1870] Ported from 1.0 branch to 0.9 branch. 

Made deployment with --jars work in yarn-standalone mode. Sent secondary jars to distributed cache of all containers and add the cached jars to classpath before executors start.
minor: add two more spaces.