lshal: clean up ListCommand::fetchBinderized

Refactor fetchBinderized. Move logic for each TableEntry to
a separate fetchBinderizedEntry function.

* Change allDebugInfos to allTableEntries to contain more information.
* Use getPidInfoCached instead of allPids for cache.
* TableEntry can be default constructed.

Test: lshal_test
Change-Id: Iceea7296b7fd4f3fa268daa74bd3b89360294124
diff --git a/cmds/lshal/ListCommand.h b/cmds/lshal/ListCommand.h
index 5af7ec2..7e252fc 100644
--- a/cmds/lshal/ListCommand.h
+++ b/cmds/lshal/ListCommand.h
@@ -85,6 +85,9 @@
     Status fetchBinderized(const sp<::android::hidl::manager::V1_0::IServiceManager> &manager);
     Status fetchAllLibraries(const sp<::android::hidl::manager::V1_0::IServiceManager> &manager);
 
+    Status fetchBinderizedEntry(const sp<::android::hidl::manager::V1_0::IServiceManager> &manager,
+                                TableEntry *entry);
+
     // Get relevant information for a PID by parsing files under /d/binder.
     // It is a virtual member function so that it can be mocked.
     virtual bool getPidInfo(pid_t serverPid, PidInfo *info) const;