daemon: Fix issues where stale router IPs were not cleaned up
daemon: Fix issues where stale router IPs were not cleaned up

Previously, removeOldRouterState would only try to clean up stale router
IPs if the `cilium_host` device had more than one address assigned to
it. The implementation however is incorrect if router IP restoration
failed, because if restoration failed, then `restoredIP` would be nil
and the function would assume the IPv6 address family, thus only trying
to remove IPv6 addresses.

But even with the proper address family, the existing logic seems to
have a bug if there is only one single stale IP on the `cilium_host`
device: If restoration failed and there is only one IP on the host
device, then the IP assigned to the device cannot be the restored one,
thus it needs to be removed.

If the single stale IP is not removed and remains on the device, once a
new router IP is allocated by `allocateRouterIPv{4,6}`, and after a new
router IP is added to the interface in `init.sh` (via `Daemon.init`),
then `cilium_host` device will wrongly end up with two router IPs (one
of which is stale).

Fixes: fcd00390c30c ("daemon, node: Remove old, discarded router IPs from `cilium_host`")

Signed-off-by: Sebastian Wicki <db043b2055cb3a47b2eb0b5aebf4e114a8c24a5a@isovalent.com>

cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium