Basic packet protocol, CustomPacket API and events. Closes #2, but needs more work.