xgettext: Change the Java extractor to make use of mixed_string_buffer.
* gettext-tools/src/xg-mixed-string.h: Include <stdbool.h>.
(mixed_string_buffer_init, mixed_string_buffer_is_empty,
mixed_string_buffer_destroy, mixed_string_buffer_result): New declarations.
* gettext-tools/src/xg-mixed-string.c: Include xg-pos.h.
(mixed_string_buffer_init): New function.
(mixed_string_buffer_alloc): Invoke it.
(mixed_string_buffer_is_empty): New function, based on comment_at_start in
x-java.c.
(mixed_string_buffer_append_lone_surrogate): New function, based on
string_buffer_append_lone_surrogate in x-java.c.
(mixed_string_buffer_flush_utf16_surr, mixed_string_buffer_append_unicode): Use
it.
(mixed_string_buffer_destroy, mixed_string_buffer_result): New functions.
(mixed_string_buffer_done): Invoke mixed_string_buffer_result.
* gettext-tools/src/x-java.c: Include xg-mixed-string.h.
(struct string_buffer): Remove type.
(init_string_buffer, string_buffer_append_byte,
string_buffer_append_unicode_grow, string_buffer_append_unicode,
string_buffer_append_lone_surrogate, string_buffer_flush_utf16_surr,
string_buffer_flush_curr_buffer): Remove functions.
(mixed_string_buffer_append): Renamed from string_buffer_append. Use
mixed_string_buffer.
(string_buffer_result, free_string_buffer): Remove functions.
(comment_buffer, comment_start, comment_at_start, comment_add,
comment_line_end): Use mixed_string_buffer API.
(accumulate_escaped, phase5_get): Likewise.