[CMake] Check for $CMAKE outside opts file.

CMAKE is nom handled similar to MAKE.
CMAKE is no longer evaluated in the opts file as this would overwrite
a CMAKE set by the dunecontrol call.
This fixes FS#1518.
[CMake] Default to use the build-dir.

The only case we do not want to use the build-dir is
when explicitly autotools are used.