Sync log.py from oslo

Add use_syslog_rfc_format config option. Default value is False.
If enabled, will add APP-NAME before the MSG part of the syslog message.

Fixes bug: #904307

Change-Id: Idd664bc98532e3a557dde5cbee213ca597d4e2e5
Enable F841 check

Enable F841 check: local variable 'name' assigned but never used.

Make appropriate changes to files listed below.

Change-Id: I02837d4abf421dc9d85f3b01587120fd68acfa12
Fix parsing of AMQP configuration

The deprecated notifier_strategy option is always used even if it is set
to its default value and the new notification_driver option is
explicitly set.

This change makes the notification_driver option work.

Change-Id: Icc2a063a828472132d2e2eda7f12e265db990ea1
Closes-Bug: #1271724
Use six.moves.urllib.parse instead of urlparse

To keep Python 3.x compatibility, use six.moves.urllib.parse to
replace urlparse.

Partial-Bug: #1279611

Change-Id: Ibe5e028acd12e8d753d95cfd9c3f63072278b120
Use uuid instead of uuidutils

Glance no longer import uuidutils from Oslo.
This patch replaces uuidutils.generate_uuid() with
str(uuid.uuid4()).

Change-Id: I463324cefe488138d709ffe0cc4a587d6ecaa850
Related-Bug: #1253497
Merge "Use uuid instead of uuidutils"
Merge "Use six.moves.urllib.parse instead of urlparse"
Merge "Fix parsing of AMQP configuration"
Merge "Enable F841 check"
Enable hacking H301 and disable H304, H302

Enable hacking H301: one import per line. H304 and H302 check enables too,
so we temporarily disable it since it does not pass.

Fix imports in files below.

Add # noqa to migration scripts.

Change-Id: I6a8d4dcd9c3195d2848f218aafe304b1240ab60c
Merge "Sync log.py from oslo"
Merge "Enable hacking H301 and disable H304, H302"