Makefile: Fix regression in dependencies on relative includes

Since commit a13a5c94 (Replace use of CollapseCombinedPath with
CollapseFullPath, 2019-03-19, v3.15.0-rc1~361^2~1), one code path now
calls `CollapseFullPath` with a base path that may be relative.
Backport KWSys commit c6f8e24a3 (SystemTools: Fix CollapseFullPath with
relative base path, 2019-07-24) to handle such base paths.

This case occurs when a build tree is placed in a directory inside a
source tree such that CMake is willing to generate a relative path from
the build tree to the source tree.  Add a test covering this case.

Fixes: #19507
Status Job ID Name Coverage
  External
passed cdash

passed cmake-dash3win10-windows-release-ninja

passed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-minoc-linux-release-lint-iwyu-tidy

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-release-makefiles

passed cmake-terfin-windows-release-vs2019

passed ghostflow-check-master

passed ghostflow-stager

passed cmake-dash3win10-windows-release-ninja

passed cmake-dash3win10-windows-release-ninja

passed cmake-dash3win10-windows-release-ninja

00:19:44

passed cmake-dash3win10-windows-release-ninja

passed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-hythloth-linux-debug-makefiles+sphinx

00:45:20

passed cmake-minoc-linux-release-lint-iwyu-tidy

passed cmake-minoc-linux-release-lint-iwyu-tidy

00:12:14

passed cmake-minoc-linux-release-lint-iwyu-tidy

passed cmake-minoc-linux-release-lint-iwyu-tidy

passed cmake-moonshade-osx-debug-ninja

00:10:18

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-release-makefiles

passed cmake-moonshade-osx-release-makefiles

passed cmake-moonshade-osx-release-makefiles

passed cmake-moonshade-osx-release-makefiles

00:12:33

passed cmake-terfin-windows-release-vs2019

passed cmake-terfin-windows-release-vs2019

passed cmake-terfin-windows-release-vs2019

00:47:47

passed cmake-terfin-windows-release-vs2019

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager