TestHelper(wifi cts): Unregister network callback on failure

Any failures in the helper method would result in the helper methods not
returning the network callback object to the caller. So, unregister the
network callback in all those cases to avoid interfering with subsequent
tests.

Also, propagate InterruptedException to callers.

Bug: 181718421
Test: atest android.net.wifi.cts
Change-Id: Iac6a94cb1b5ce2abc63975942db2904d9860d561
4 files changed