xgettext: Fix parsing of JavaScript template literals inside functions.
Reported by Dmitry Vinnik <vinnik.dmitry07@gmail.com>
in <https://savannah.gnu.org/bugs/?56678>.
* gettext-tools/src/x-javascript.c (brace_depths, brace_depths_alloc): New
variables.
(brace_depth): Remove variable.
(new_brace_depth_level): New function.
(phase5_get): Invoke it. Access the top of the brace_depths stack.
(extract_javascript): Don't set brace_depth. Invoke new_brace_depth_level
instead.
* gettext-tools/tests/xgettext-javascript-7: Test template literals inside a
function.