Add [sql].connection as deprecated opt for db

The database configuration would not allow 'connection' option in
the [sql] section as a deprecated option for 'connection' in the
[database] section.

Keystone currently uses 'connection' in the [sql] section, so if
we want to use oslo.db in Keystone then it will need to support
'connection' in the [sql] section for existing users.

Change-Id: Id876781a6ee508abb4565c25c59058be74392e64
Add utils for creating tempfile

These functions are useful for creating different
temporary files with specialized content. write_to_tempfile
is new function intead create_tempfiles in tests.utils module.

Blueprint: common-unit-tests
Change-Id: Ia51d416b2828a95fbb60d019cc92c4c8288bccc3