Adding type definitions for pg

This is heavily based on the definitions from sqlite3. The Connection
class is not defined because pg says that it is private for most use
cases. I left that work for people who need it.
Merge pull request #2269 from pspeter3/master

Adding type definitions for pg