xgettext: In language JavaScript, avoid stack overflow.
* gettext-tools/src/x-javascript.c (MAX_NESTING_DEPTH): New macro.
(paren_nesting_depth, bracket_nesting_depth, brace_nesting_depth,
xml_element_nesting_depth): New variables.
(extract_balanced): Increase and check paren_nesting_depth or
bracket_nesting_depth or brace_nesting_depth or xml_element_nesting_depth before
calling extract_balanced recursively.
(extract_javascript): Initialize paren_nesting_depth, bracket_nesting_depth,
brace_nesting_depth, xml_element_nesting_depth.
* gettext-tools/tests/xgettext-javascript-stackovfl-1: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-2: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-3: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-4: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-5: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-6: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-7: New file.
* gettext-tools/tests/xgettext-javascript-stackovfl-8: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.