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

This is another implementation about #1031
I see this logic to buld `LD_LIBRARY_PATH=foo` in at least 3 different places, and they all look very similar if not identical. Probably time to put this in a helper method somewhere.