Helper function to sanitize db url credentials

The database url is sanitized in logfiles because of security issues.
However the connected url itself is useful information to devs and admins.
This patch provides a helper function to sanitize only the credentials
in a database url. All projects must process the CONF.database.connection
value using "sanitize_db_url" when updating the db package

Fixes bug #1076833

Change-Id: Id6cf7b120ef6c3fcda7f33fd26676b62a4475bb2
Merge "Helper function to sanitize db url credentials"