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.

Bug: 64503245
Test: ./tests/test_module_info.py
Test: vndk and check-dep on multiple devices and get the same output.

Change-Id: I4253205f63798a4cf4ef3b8cd08ec65711381337
Merged-In: I6e7a59773a35d62bde6454cc3052f76224c1fe21
(cherry picked from commit 5a6ff39a806807b197353f4713d0a612d7d3e43b)
2 files changed