This refactors the thin_archive tool to use emitters and scanners
to note that when linking to a thin archive, you must also depend on
the children of that thin archive. Failing to do so is an error,
because a changed .o does not necessarily lead to a different .a,
which would subvert the SCons dependency mechanism.
This also includes a refactoring of the ABILINK tool to use a similar
mechanism, to achieve the opposite effect. For ABILINK, we want to
depend not on the actual .so, but on the hash of its abidw result. We
use emitters, actions, and scanners to produce an associated .abidw
file for each .so we build, and then update the scanner to depend on
the .abidw of our libraries, not the library itself. This allows us to
elide needless relinks.
By default on SCons, the Library and StaticLibrary builders are
the same object, so adding the target_factory to StaticLibrary is
sufficient. If they aren't the same, then even more important
to only modify SaticLibrary, since Library may have been re-purposed
to mean something else. In our case it does mean something different
when using --link-model=dynamic, so this oversight inadvertently changed
the signature calculations for dynamic libaries.
Also includes a drive-by fix to add LoadableModule to the builders
affected by the abilink.py tool, since a LoadableModule is also
a shared library on the platforms where abidw is in play.