vndk-def: Refactor ModuleInfo class

This commit refactors ModuleInfo class to speed up the source directory
lookup.  Besides, the commit also moves ModuleInfo upward so that it
can be used by other commands in the upcoming commits.

Test: ./tests/test_module_info.py
Test: vndk and check-dep on multiple devices and get the same output.
Change-Id: I6e7a59773a35d62bde6454cc3052f76224c1fe21
2 files changed