Allow users to configure maximum number of database connections

For both the MySQL and PostgreSQL database backends, allow the user to
configure the maximum number of concurrent database connections.

This is useful in environments where a very limited number of database
connections are available. This is also useful in environments with
strict policies against persistent database connections. In this case,
max_connections can be set to 0, which disables persistent database
connections completely.
9 jobs from db-max-connections in 5 minutes and 20 seconds
latest
Status Job ID Name Coverage
  Sqlite
passed #134960
sqlite1

00:00:35

passed #134961
sqlite2

00:00:35

passed #134962
sqlite3

00:00:40

 
  Postgresql
passed #134963
postgresql1

00:02:15

passed #134964
postgresql2

00:02:17

passed #134965
postgresql3

00:02:24

 
  Mysql
passed #134966
mysql1

00:02:14

passed #134967
mysql2

00:02:12

passed #134968
mysql3

00:00:43