[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.
minor: Not your code, but could you bump `.toBoolean` up one line? I'm pretty sure it's under 100 characters.