New database configuration scheme

Allow users to provide database settings individually instead of as a URL.

The URL method of passing is still valid for backwards compatiblity. If a URL is provided, it supercedes the individual options.