iOS close socket support

added support for iOS closing the UDP socket when locking the screen
iOS save adapter in context + dealloc on finalize