Fix common.log.ContextFormatter for Python 3

The incompatibilty of common.log.ContextFormatter with Python 3 is due
to the use of 'hack' with Formatter._fmt, which is not working since
Python 3.2 after introduction of different styles of formatting
syntax. The formatting string in Python3 should be stored in
Formatter._style object.

In this patch the property where the formatting string should be written
is selected based on the current version of Python.

Change-Id: Ibb2244ce95137996ad927fbb9d4380a0e32d8b46
Merge "Fix common.log.ContextFormatter for Python 3"