Use user defined $SPARK_HOME in spark-submit if possible

This is useful when $SPARK_HOME of the submission machine is not the same as the slave machinese, eg. when running with Mesos.