build: Avoid the doctemplates hack
The hack that copies the doctemplates directory into the build directory has stopped working with newer versions of Meson; while it's possible to copy files, custom_target() cannot depend on a directory. Additionally, the dependency has always been broken.
Instead, we enumerate the template files—after all, it's not like they change a lot—and then we list them as dependencies for the test targets.
Fixes: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/414
Backport fix from, https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/effb1e09dee263cdac4ec593e8caf316e6f01fe2