Adjust TorProviderBuilder to report the provider state to consumers

As a prerequisite for #43570 and #43571, we want to adjust TorProviderBuilder to allow TorConnect to read the provider's current status.

I would also like to do some clean up of the code.