Fix the query function to behave exactly like Connection.query

The second argument of Connection.query could be either a function
(callback) or a list of values. The ConnectionPool.query should not
assume that the third argument to be the callback function