[WIP][SPARK-1720][SPARK-1719] use LD_LIBRARY_PATH instead of -Djava.library.path

This is another implementation about #1031
The command instance is created on different machines. Environment variable cannot be used directly.

We can try to build a local Command instances:
```
  def buildLocalCommand(
    command: Command,
    substituteArguments: String => String,
    classPath: Seq[String] = Seq[String](),
    env: Map[String, String] = sys.env): Command = {
    val libraryPathEntries = command.libraryPathEntries
    val newEnvironment = if (libraryPathEntries.nonEmpty) {
      val libraryPathName = Utils.libraryPathName
      val cmdLibraryPath = command.environment.get(libraryPathName)
      val libraryPaths = libraryPathEntries ++ cmdLibraryPath ++ env.get(libraryPathName)
      command.environment + ((libraryPathName, libraryPaths.mkString(File.pathSeparator)))
    } else {
      command.environment
    }
    Command(
      command.mainClass,
      command.arguments.map(substituteArguments),
      newEnvironment,
      command.classPathEntries ++ classPath,
      Seq[String](),
      command.javaOpts)
  }
```