Replaced String check with string conversion
Replaced String check with string conversion

Currently the string_check is destroying the data when the system
is not able to convert them properly.
This is now fixed by allowing unicode strings as they are
and an attempt of decoding input (non-unicode) strings based
on the prefered locale encoding.

If this will fail, the replacement of unknown characters are applied.

In any case an unicode string is created. If the string is not
convertible, the return value will be "????" as a replacement.
This however is the last resort, to allow at least some level of
data to go through. (e.g. when the application list contains one
invalid data string currently it would cause the whole list NOT to
be sent. Now it will be sent)

Please also note that this commit will fix the failing unit tests.

Change-Id: Ie277069cbfa39f9735a2b85b9e9da9c3fcfe5938
Signed-off-by: Vinzenz Feenstra <600e8a10eeff4f08c65e2cf493cd851025e86fd2@redhat.com>

silenceli/oga-windows,oVirt/ovirt-guest-agent,oVirt/ovirt-guest-agent,oVirt/ovirt-guest-agent,silenceli/oga-windows,silenceli/oga-windows,oVirt/ovirt-guest-agent,silenceli/oga-windows