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

This is another implementation about #1031
```
def buildEnvironment(
    command: Command,
    env: Map[String, String] = sys.env): Map[String, String] = {
  ...
}
```