Fix bug when freeing packets that have already been free()'d in the linux ring format.
Fix bug checking for registerthread rather than unregisterthread.
Fix Linux native format which was using the socket when running multiple threads.