I've modified the servlet and client code so HTTP connections can be reused from one query to the next (AKA Keep-Alive or pipelining). This involves serializing all of the objects to be sent to or from the server into memory rather than directly to the network connection, so we can figure out how many bytes we are about to send and set the content-length header, a critical part of the keep-alive system.
Empirical testing shows that this can reduce overhead vs. a direct connection to a MySQL server from 200% to 50%. YMMV.
Adds support for HTTP connection reuse when wrapping