vndk-def: Link imported symbols.

This commit resolves the library dependencies down to symbol level.  It
will traverse all undefined symbols and try to find a matching symbol
from the libraries specified in DT_NEEDED entries.  This algorithm
won't be able to find symbols for the libraries that are not built with
-Wl,--no-undefined.  Unresolved weak symbols are added to
unresolved_symbols as well.

Test: ./tests/run.py

Change-Id: I3b0f06e38f256025bb6993d5c9f3d8afc3a4bf0e
2 files changed