msgfmt: Refactor --desktop handling
* gettext-tools/src/msgfmt.c (get_languages): Avoid redundant memory
allocation.
(msgfmt_operand_list_init): New function.
(msgfmt_operand_list_destroy): New function.
(msgfmt_operand_list_append): New function.
(msgfmt_operand_list_add_directory): New function.
(msgfmt_desktop_bulk): Rewrite using msgfmt_operand_list_ty.
* gettext-tools/src/msgfmt.h (msgfmt_operand_ty,
msgfmt_operand_list_ty): New type.
* gettext-tools/src/write-desktop.c (msgdomain_write_desktop_bulk):
Simplify using msgfmt_operand_list_ty.
(msgdomain_write_desktop): Simplify using msgfmt_operand_list_ty.
* gettext-tools/src/write-desktop.h (msgdomain_write_desktop_bulk):
Take OPERANDS as the first argument, instead of LANGUAGES and MESSAGES.