[Core] Get rid of some of our asynchronous initialisation when running mdtool

We *cannot* have things asynchronously initializing in the case where we are
invoking mdtool setup reg-build. This causes all kinds of errors as our
code assumes that once we initialize MD, the addin registry is safe to use.
If we execute reg-build we actually delete the entire addin database cache
from the disk and so we can trigger issues like multiple threads trying
to rebuild the database simultaenously, or weird exceptions because the main
code is trying to access information from addins like Addin.Description, which
is loaded from the files on disk which have been deleted as we are rebuilding
the database.