Have DhcpClient transit to StoppedState on lease renew failure.

When receiving DHCPNAK or renewed lease doesn't match the current
IP address or IP lease has expired in renew/rebind state, transit
DhcpClient state machine to StoppedState instead of INIT state.
Bascially this is more reasonable to rollback to the StoppedState
and wait for the following command from wifi(e.g. restart IpClient
immediately for a new provisioning) when renew failure happens.

Since IpClient will call onProvisioningFailure callback eventually
(IPv4 link address will be cleared from the interface) to tell wifi
IPv4 provisioning failure and wifi stops IpClient, however, before
that DhcpClient has transited to INIT state and broadcasted DISCOVER,
which seems not being helpful and error-prone to cause race.

Bug: 204723906
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: Ia7eaaa444e00495bf953b4a221aa406d6cc39d2d
2 files changed