GSS: reuse existing Subject and GssCredentials
Change MAX_BUFFERED_QUERIES to a byte measure and count buffer bytes

Per GitHub issue #194 and the comments above MAX_BUFFERED_QUERIES,
we're using a pretty rough heuristic for receive buffer management.

This approach can't account for the data in prepared queries that
return generated keys, it assumes a flat 250 bytes per query
response.

Change that, the buffer in bytes, up to an estimated MAX_BUFFERED_RECV_BYTES
(still 64k, same as before) with an estimated NODATA_QUERY_RESPONSE_SIZE_BYTES
or 250 bytes per query.

Behaviour is not changed, we're just counting bytes instead of queries. This
means that it's now possible to adjust the baseline
NODATA_QUERY_RESPONSE_SIZE_BYTES for the size of any returned columns in a
query with a RETURNING clause in a subsequent patch.
Document batch result set handling, other comment fixes
Factor deadlock avoidance code into subroutine
Support batching for prepared statements that return rows.

With this change, PgJDBC calculates the estimated return size for the result
row, assuming that each batch item returns one row for getGeneratedKeys() use.

Instead of forcing batching off and sending individual queries, it then queues
enough binds and executes to fit safely within the receive buffer and server's
send buffer before sending a sync and reading the result buffer.

Batching is still forced off when the result set size cannot be estimated (e.g.
due to unbounded 'text' columns, use of arrays in the result set, etc).

This is a minimal workaround for github issue #195, though it doesn't prevent
deadlocks that can already occur due to #194.
Changed visibility of the fields autoCommit, readOnly,
bindStringAsVarchar and firstWarning from public to private.
Escape schema name when setting search_path
Add tests for schema name containing special characters
Use maven-ant-tasks to fetch waffle-jna

We need Waffle and its underlying JNA dependencies in order to support
SSPI authentication on Windows. We compile that support on all platforms,
it just only actually works when running on a Windows host.
Add SSPI support to PgJDBC

This change will cause code that was previously attempting direct SSPI
negotiation against a Kerberos server to instead use Windows' SSPI support
if it is available.

SSPI support using waffle-jni is always compiled, but the libraries are
not included in the default PgJDBC jar. They must be added on the classpath
or included in a "fat jar" for SSPI to work. When missing, PgJDBC throws
an informative exception.

This commit changes the default behaviour of the driver to use SSPI, but only if:

* Waffle-JNA is present on the classpath;
* We're running on Windows; and
* 'sspi' mode was requested by the server.

... so unless a project already has Waffle-JNA on its classpath for other
reasons you won't notice the change unless you take explicit action.

The new parameter `gsslib`, modeled after the libpq parameter of the same
name, is added to allow users to override whether SSPI is used where it
is available. The default is automatic selection as outlined above.

This parameter also lets you force use of SSPI against a server that makes a
`gssapi` mode auth request. That way a Windows client with existing
single-sign-on credentials for an spnego-enabled Kerberos server can re-use its
existing credentials via SSPI. Unlike libpq, which defaults to using SSPI on
Windows, PgJDBC will not attempt to use SSPI for a GSSAPI auth request this
unless explicitly forced to, as most Java users will prefer to do GSSAPI via
JSSE rather than via Windows SSPI.
Copy maven-ant-tasks dependencies to lib/ for use in Eclipse etc
Create an ant 'dist' target that bundles the driver for distribution, update README
Import Waffle's pom and use its slf4j version

Instead of defining our own slf4j version, reference the one from the Waffle
POM directly when we're bundling a copy of slf4j-simple as part of our
distribution zip. This means the version will always match what Waffle
expects.
Generate the pom.xml with ant-tasks rather than using a template

Remove src/pom/pom.xml and generate it from maven-ant-tasks, so we can
automatically include dependency information.
Provide a more appropriate name for the driver in the Maven POM
Setting the search_path from currentSchema property is done in startup packet (v3 protocol only)
isValid has no impact on transaction state
Using setStringType on DataSource correctly set the associated Connection property
Merge pull request #206 from golovnin/AbstractJdbc2Connection_field_visibility_fix

Changes visibility of some fields from public to private.
Merge pull request #218 from alexismeneses/ISSUE_214

Connection.isValid() should have no impact on transaction state

See issue #214 for details.