Register HAL event callback only if IWifi is ready

Added NULL check for mWifi to avoid NULL pointer exception.
Also removed synchronized block from stopWifi() method
as the callers are already calling stopWifi() inside the
synchronized block.

Bug: 236099650
Test: atest com.android.server.wifi
Test: Manual - removed the driver module(.ko) from file system
    & confirmed that device is not crashing on truning ON wifi
Change-Id: If20d20c4ef22942b228b785fdefa43e24cb1127f
1 file changed