Packet cleanup

Removed the bytebuffer stored in the Packet. Data is now directly
copied into the data.bytearray instead of into an intermediate
buffer.

Simplified code
Test fixes
Merge pull request #4094 from pveentjer/cleanup/3.x/packet

Packet cleanup