libintl: Fix pointer use after free and make error handling robuster
Previously, _nl_find_msg had a use of pointer after free'd. Also,
some callers of the function didn't check the failure.
Merge changes from glibc. Reported by Carlos O'Donell in
<https://savannah.gnu.org/bugs/?38930>.