Clean up CMake files

I did some clean up, mainly in `doc/CMakeLists.txt`. As the man page is readily available without having to be built I think it is reasonable to install it even if `BUILD_DOCS` is not set. If nobody objects I'm going to merge this in the next days.