Added pool stretching unit test
Backdoor posiblity to hid connection errors

Used by unitests to suppress output
of expected connection errors
Fixed over-stretching bug

Stretch mechanism was adding one additional connection on top of
what really necessary.
Minor refactoring

Overriding local variables can lead in very subtle errors
especially if callbacks use these variables later on.
Catching early connection related errors

If connection is already dead, try to get its cursor
or execute a command will fail even before we add
it to ioloop for polling.
Catching these exceptions and propagating them into callback.
Lots of unittests :-)
More Pythonic approach for getconn and ping
Exposing server_version as Pool attribute
Fixed mogrify tests

It seems that mogrify semantics changed between Psql 8.x and 9.x
Refactoring

Getting rid of nested functions definitions.