Added peekNetworkPacket()
Fixed the Packet::type bug

In popNetworkPacket(), a second Packet p was being created, which was
destroyed when it went out of scope, and the original Packet p was being
returned.