kicking cc3k

This PR does 2 things:

* kicks out of a forever loop if we miss an IRQ
* correctly tracks sockets closing
Is CC_ENOTCONN a CC-defined keyword?