WifiStateMachine: check for null config after dhcp

If a network config is removed while we are in the ObtainingIpState, we
will attempt to get the configured network from WifiConfigManager but it
will be null.  As we move to the Connected state, this throws a NPE.
Instead of moving along to the Connected state, disconnect from the
network if we find out we have null for the current config.  Also add an
additional null check where the NPE was thrown further down the line.

Bug: 65257934
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ibbce6491970de16cf5265b03398b50a7cdd50ba2
2 files changed