Limit number of open connections to the DB.
Limit number of open connections to the DB.

Summary:
Avoid connection explosion to Postgres when a few requests take longer to process.
Bound the number of open DB connections to 200 per API server.
Also, allow idle connections to recycle used connections instead of creating a new one for each
request. Limit these to 50 by default to avoid blocking resources on the server (pgbouncer, really)

Reviewers: kylec

Reviewed By: kylec

Subscribers: changesbot

Differential Revision: https://tails.corp.dropbox.com/D149479

dropbox/changes-artifacts,dropbox/changes-artifacts