Instead of having similar logic that is nearly the same
as what oslo.utils provides just call into the oslo.utils
functionality and use it instead.
This also allows us to pass a 'errors' keyword parameter
and have it be used in oslo.utils to be used when some kind
of encoding or decoding issue occurs (by default this is
'strict', as that is the default used by oslo.utils and
python itself).
Change-Id: Ia73340da7b47e1d450aa4ba41e3905d447691743