Refactor freeciv-proxy to make it more robust, use less resources and read packets more correctly.