General cruft cleanup, moved packet processor to its own file

- Cleaned up a lot of unused includes and commented out code
- Moved ProcessPacket to its own file, the function was big enough to not be inside the convoluted socket.c file