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

- [X] Standalone
- [X] YARN 
- [X] Mesos
- [X]  Mac OS X
- [X] Linux 
- [ ]  Windows
 
This is another implementation about #1031
Actually, should this just replace `buildCommandSeq`? I think it makes little sense to have both `buildLocalCommand` and that. It's really confusing which one you should use. I would just move everything from `buildCommandSeq` into here, then make `buildJavaOpts` private.