Add a service registration callback, and implement it for the ModernDependencyResolver

This is untested (about to test), so it may have a logic bug or 4, putting it up as a proof of concept plus the hope that I can implement trivial bug free code (hah!)