Adds support for specifying the order that items appear in llvm::Registry instances.
Currently they appear in the Registry linked list in an undefined order due to the 'static initialization order fiasco'.
For most registries this doesn't pose a problem as there is no observable difference in behaviour, however for a select few there is.
Take the CompilationDatabasePlugins as example. Usages of this is to load a database from a directory with each plugin, breaking out of the loop once a plugin is successful.
In the case where 2 plugins both can load from the same directory, the database you will get will depend on which plugin entry was initialized first. A bug for this has been reported here - https://github.com/clangd/clangd/issues/578.
This patch adds an optional paramater to the Registry::Add function to specify the order of the plugins in the list, lower orders appear near the start. Any plugins that dont specify an order will be placed at the end using the same SIOF behaviour that currently exists.