Adapt DB provisioning code for CI requirements

With recent changes made to our CI MySQL openstack_citest user now
has enough priviliges to create and drop databases. But the code,
that we use for provisioning of databases must be updated, so that
it's not mandatory for openstack_citest user to be also able to
do GRANT/ALTER ROLE queries. Actually this simplifies provisioning
code a bit and allows to reuse the same queries for PostgreSQL and
MySQL.

This will be used for opportunistic db test cases as well as for
running of DbTestCase tests on different backends.

Change-Id: Ia917f647182d908dbb2a86659ad8b4e49c492881
Change lazy translation to retain complete dict

When replacement text was retained for later translation, only
the entries that were associated with the keywords in the
format string were retained.  There was a bug in how the keywords
were parsed.  This reduction was done to support the use of
locals() to specify the replacement text.  This is now prevented
by H501 (confirmed in all projects).

This means that instead of fixing the parsing code to correctly
find the keywords, the entire dictionary can now be retained
and the code for finding the keywords and stripping out unused
entries removed.

Change-Id: I7969dc20841d839f68b2ddb29ac47340c6b615e8
Closes-Bug: #1288049
Merge "Adapt DB provisioning code for CI requirements"
Merge "Change lazy translation to retain complete dict"