Extend configure_external_projects_for_test to pretty print dependency tree

Then for future reference, the generated text can then be copied into
the CMakeLists implementing the test.

The way expected optional and required dependencies are specified in the
CMakeLists.txt describing the project is now consistent accross the
different tests.