fix bad pg connections before returning to pool
This is fantastic, thank you. I will merge, but I'd like to tighten up the API first. Thanks again. I've made some small cleanups/changes to the APIs but this feature is now merged. Thanks again.

082f13bf6b3a740c07bf35dafaf699e236b097e1
For https://github.com/coleifer/peewee/issues/1138

Thanks!