monopam: detect Dead_lib — libraries declared in dune but unused in source
When a stanza's '(libraries L)' clause includes a library whose modules
never appear in any '.ml' / '.mli' in the same directory, that library
is dead weight: it bloats compile time and pollutes downstream META
'requires'. The signal is most useful for catching transitive
dependencies that survived a refactor, and for sublibs whose modules
were folded into the parent.
Resolution rule: read modules from '_opam/lib/<lib>/dune-package' when
present (parsing for '(library (name X) (main_module_name Y) (modules
M ...))'), otherwise fall back to listing '.cmi' basenames in the
install dir (zarith, asn1-combinators, ounit2 and similar pre-date
dune-package metadata). Modules with '__' in the name are wrapped
private modules and are filtered out of the fallback set.
The Lint.kind variant gains a third constructor 'Dead_lib'; the CLI
groups its issues alongside Missing and Unused. mdx-files-only stanzas
are skipped — they are intentional README wiring with no source modules
of their own.