A bit more of cleanup in the packethooks

Changed them to use the PacketRegistry. The length of variable packets
is set to -2 (MSGLEN_2BYTELEN_DATA), as is done for the normal packets,
so no special treatment is needed.