Depcheck improvements

Improvements to dependency checking. Still a work in progress but ready for initial review and comments. cc @julen

    This allows a more decentralized approach to dependency checking where each
    module is responsible for its dependency checks.
    The non-core dependencies still need to be ported in a later commit.
    
    Note that this has a mild performance impact and this logic should only run
    once per instance startup.
Missing license snippet.