[srp-server] ensure to clear `mHasRegisteredAnyService` on server stop (#6763)
[srp-server] ensure to clear `mHasRegisteredAnyService` on server stop (#6763)

This commit updates `Srp::Server` to clear `mHasRegisteredAnyService`
when server is stopped and all the hosts and services are deleted.
This boolean flag is used to save the port number in non-volatile
settings so that we can ensure to pick a different port number the
next time the server starts.

This change addresses an issue where the port number may not be saved
and therefore not changed if the server is stopped and restarted
two times in a row.

abtink/openthread,openthread/openthread,openthread/openthread,abtink/openthread,jwhui/openthread,abtink/openthread,openthread/openthread,jwhui/openthread,srickardti/openthread,openthread/openthread,jwhui/openthread,jwhui/openthread,srickardti/openthread,abtink/openthread,srickardti/openthread,srickardti/openthread