tests: fix isc/socket_test.c teardown
In case of a test failure we weren't tearing down sockets and tasks properly, causing the test to hang instead of failing nicely.
In case of a test failure we weren't tearing down sockets and tasks properly, causing the test to hang instead of failing nicely.