Make PostgresSQLConnection defensively thread safe

Race conditions should be properly caught, but will still throw a
ConnectionStillRunningQueryException.  Basically this just involves making
setQueryPromise check for an existing promise and reordering operations to
happen within this mutex.  readyForQuery is no longer necessary as it is fully
redundant with queryPromise.  For Issue #59.
Make MySQLConnection defensively thread-safe

Use the same approach as in PostgreSQLConnection, where queryPromise is an
AtomicReference.  Previously it would check queryPromise.isComplete.  However,
there was no way that a non-null promise could be complete as the only two
places it was completed (in {succeed,fail}QueryPromise) immediately set it to
null beforehand.  This should be reviewed/tested.  Issue #59.

Updated clearQueryPromise in both to return the old promise, in order to avoid
racing completions.
Minor optimization: use foreach rather than map
Decode OIDs as Long

Technically OIDs are uint32, so Int is a theoretically better choice, but this
would not properly preserve the unsignedness, which would then confuse input.
Test pulling oids from a select
Merge pull request #63 from dylex/mutex

Connection mutex improvements for issue #59
Improve URL parser to allow missing hostname/dbname

Both the // and / parts of the URL are optional.  Also fix a crash that would
occur on any invalid URL.
Merge pull request #64 from dylex/missinghost

Improve URL parser to allow missing hostname/dbname
Merge pull request #62 from dylex/oid

Decode OIDs as Long
Allow postgres queries to contain '??' for '?'

Issue #60.  Also makes query parsing about 20 times faster.
Avoid parsing prepared statements more than once

We can use PreparedStatementHolder to store information about the statement,
including the parsed statement.  Also avoid unnecessary lookups by storing the
this handle directly.
Merge pull request #65 from dylex/placeholders

Improve placeholders and prepared statement handling
Making sure column order is preserved, fixes #61
Merge pull request #54 from dylex/transaction

Add Connection.inTransaction to wrap queries in a transaction block