Instead of sendPacket/sendError being sprayed all over the place, this
change has all those places instead return a responsePacket (eventually)
back to the main handling function which then calls sendPacket in one
place.
Behaviour of the code should remain exactly the same.
This makes it much easier to work with the response packets (eg. for the
packet ordering issue I'm working on).