search-path: Don't relocate dirs given as envvar
* gettext-tools/src/search-path.c (foreach_function_ty): New typedef.
(path_array_ty): New struct.
(foreach_components, increment, fill): New functions.
(get_search_path): Rewrite using those functions. Relocate
GETTEXTDATADIR here.
* gettext-tools/src/search-path.h (get_search_path): Update documentation.
* gettext-tools/src/msgfmt.c (main): Don't relocate directories in ITS
search path.
* gettext-tools/src/xgettext.c (main): Likewise.