Provide a synchronous registration and unregistration of services.

Some parts of repl require being able to disable a service and block
until it's disabled.  Provide this API.