core: Replace forked Postgresql driver + connection pool

We now use upstream Erlang projects poolboy and epgsql to do the
connection pooling and database connection.  Sites learned a new
configuration option, 'dbdriver', which indicates which database
driver to use.

See:
- https://github.com/epgsql/epgsql/
- https://github.com/devinus/poolboy