yaz: recommend depending on icu4c

as discussed in #31830

Also:

* add test for yaz-icu when building with ICU
* do not use File.open for writing test configuration files