properly mark dynamic and static dependencies

Some application modify the environment varaible on the fly and
then they load more subporcess with the new environment (in
particular at LD_LIBRARY_PATH)

To properly detect dynamically loaded dep we need to look at the
value of the environment varaible when the specify executable was
run. We need to see the runtime value of LD_LIBRARY_PATH for each
executable.

This patch fixes this issue so that now each executable is analyzed
with the env variable used at runtime
code refactoring

create a common getLDLibraryPath to be used by both plugin/elf.py
and sergeant.py