518c003 DP: Check callback messages for valid UTF-8

Authored and Committed by jhrozek 8 years ago
    DP: Check callback messages for valid UTF-8
    
    https://fedorahosted.org/sssd/ticket/2861
    
    Messages passed from Data Provider to responder must be valid UTF-8
    strings. Because providers might not be completely under our control,
    we need to check if the messages we receive are valid UTF-8 and if they
    are not, use a fallback.
    
    Reviewed-by: Sumit Bose <sbose@redhat.com>
    (cherry picked from commit e8ae3af6724164048a85c374ea8045a368a2d34e)