tor-hsservice: Derive service state from the state of its components.
We need to know the status of each component to be able to report the
overall status of the service. Without this change, the service (and its
components) have no way of knowing if a given transition is valid: if
the state of a component (say, the IPT manager) is Bootstrapping
,
Recovering
or Broken
, a transition out of the current state is only
valid if it is initiated by the same component that caused the current
state (for example, if the publisher sets the state to Recovering
, the
IPT manager should not be allowed to trigger an overall state transition
to Running
).
Part of #1083 (closed)