Fixed memory leak in socket leak detection

Thanks, valgrind. zsys wasn't freeing the sockrefs when
destroying sockets via application calls.
Merge pull request #484 from hintjens/master

Fixed memory leak in socket leak detection