ExternalData: determine the data path properly

The data file itself does not exist, so REALPATH does not work. Instead,
split it into a directory and name, REALPATH the directory, then put it
back together. Just using ABSOLUTE does not work because
CMAKE_SOURCE_DIR uses REALPATH while ${project}_SOURCE_DIR uses
ABSOLUTE. If these are not the same, the out-of-source DATA file
detection gives a false-alarm.
Merge topic 'dev/fix-externaldata-with-symlink-in-source-path' into next

8a3c081b ExternalData: determine the data path properly