[3.0.x backport] contrib: Backport gettext updates
This updates gettext to 0.22; not all the newest used in the master branch, but a couple of steps further ahead.
This fixes building with the latest nightly mingw-w64 targeting UCRT; https://github.com/mingw-w64/mingw-w64/commit/77f6d1a18fd36e1866cc9b923c505230e8918786 caused gnulib in gettext to select a different set of functions to provide, which makes the old embedded gnulib fail on mingw-w64 targeting UCRT. This issue is fixed in the newer versions of gnulib embedded in newer versions of gettext, used in VLC git master. (Intermediate upgrade steps fail building with current mingw-w64 versions with other issues.)
The first three commits are simple straightforward backports. The later ones are a bit more manually tweaked, as they depend on large contribs-wide refactorings like 3ce55c39, 697a2fcd, d4c40209, 8a2109a3, and I didn't want to take on backporting them. (If you prefer backporting them too, that's of course fine, but then I'd appreciate if someone else takes on doing that.)