libmodprobe: Implement ModuleDependencyGraph

This commit introduces ModuleDependencyGraph, which will be used by the
ueventd coldboot. Instead of loading a module altogether with its
dependencies, this graph enables obtaining dependency free modules that
can be loaded right away. This approach will be useful to prevent
concurrently loading the same kernel module.

Test: atest system/core/libmodprobe/module_dependency_graph_test.cpp
Bug: 421025789
Change-Id: I0748434e2f19189e16bbd278ce7e6c4c2662552e
4 files changed