[CMake] Fix handling test programs.

Cleanup auto-translated CMakeLists.txt.
[autotools] Make sure to distribute dune.module in the tarballs