Make Messages unicode before hitting logging

Some of the log handlers in the python standard library
are hitting issues with Messages since they check for
basestring types only, and attempt to coerce anything else
to string. This leads to Messages being coerced to bad encodings,
resulting in unhandled exceptions.

This change adds a check that looks for non-basestring
objects and coerces them to unicode before they hit the problematic
logging areas.

bug 1225099

Change-Id: I0bff6b52205e3c88db38876b8c6de1bd820f460a
Co-authored-by: Luis A. Garcia <luis@linux.vnet.ibm.com>