ctest: improve helper code for easier writing of CTest scripts

Moreover, remove the pred-defined configurations. They don't make much
sense as each build site may need some deviation.