cmDyndepCollation: look at all `export(TARGETS)` calls
Previously, only export()
calls in the same directory were noticed.
Also add a test that exports in a different directory than the target itself resides in.
Fixes: #25813 (closed)
Backport: release
Manual-backport: release-3.28:HEAD^2