UTIL: Sanitize newline and carriage return characters.
Introducing valid usernames with a trailing newline character triggers
the removal of valid LDB cache entries.
Resolves:
https://pagure.io/SSSD/sssd/issue/3317
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
(cherry picked from commit ee2906c1d50ab8001863b0a423fe957d4e0bcb37)