Description
Since QueryServlet instantiates the serializer automatically based on the serializer class, it precludes callers from using serializers that maintain state of any kind. Specifically, QueryServlet cannot be used with CSVSerializer, since CSVSerializer requires the setup of keys.
We should simply provide an abstract newSerializer() method that subclasses implement to return an appropriate serializer. A private concrete method of the same name already exists and uses Class.newInstance() to return the serializer.
NOTE: This change will constitute an API change for subclasses of QueryServlet – instead of using serializerClass, they'll have to implement newSerializer().