ctest: support ctest runs Debug

CMAKE_BUILD_TYPE was "hardcoded" to Release. Now the build_type
environment variable can overwrite this default. Also this string is now
added to the BUILD_NAME.

Signed-off-by: Matthias Kretz <kretz@kde.org>