This adds a seperate library like with autotools.
This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.
For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.
Fixes#2338
Fixes compiler warning
test-unicode.c:589:1: warning: ‘test_unicode_properties_lenient’ defined but not used
which didn't happen with autotools.
Reason it does with meson is that the setup for C was slightly wrong.
We would only add -DHAVE_CONFIG_H to cpp_args which is only valid when
compiling C++ code, but not plain C code, and many of these tests were
plain C.
Instead pass -DHAVE_CONFIG_H via add_project_arguments() and make sure
to set both c_args and cpp_args when building test executables.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2257