Fix socket

addressing issue 245.

I don't honestly know why we need to call libnet_clear_packet twice, one while exiting the udp send and the other one while enterning into arp_send.

I tried to print "c" and it is wrong (some really high numbers) when changing between udp and arp.

Putting the line twice after udp_send DOESN'T work at all.

Something is definitively wrong with the thread implementation.