Rewrite of packet handling system!

Recommended by minecraftcpw to prevent possible memory leaks!