xgettext: Make literal parser robust against NUL
* gettext-tools/src/x-c.c (literalstring_parse): Add more NUL checks.
Change the loop invariant so that C always points to the character
previously pointed by P.
Reported by Hanno Boeck in:
<http://savannah.gnu.org/bugs/?45391>.
* gettext-tools/tests/xg-c-21.c (main): New file.
* gettext-tools/tests/xgettext-c-21 (result): New file.
* gettext-tools/tests/Makefile.am (TESTS): Add new test.
(EXTRA_DIST): Add xg-c-21.c.