[dune-autogen] Prevents overriding am_dir with installed modules.

Before this patch we tried setting am_dir for directory with a
DUNE module. If one is working with local modules
(e.g. dune-common and dune-geometry), that are a subset of installed
modules (e.g. dune-common, dune-geometry, and dune-istl), that are all
installed under the same prefix, then modules that are part of the difference
of the set of installed and the set of the local modules caused am_dir to
point to the am directory of the installed dune-common directory.
After this patch  am_dir is only set once, which fixes this behaviour and
flyspray issue #1420
(cherry picked from commit 073167e61070a5e952c738c02d85c3f946717e40)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>
[CMake][release] White space changes.

Replace tabs by spaces.
(cherry picked from commit 3cb196db6340dfe4437912514f0c5bf043d73d45)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>
[CMake][release] Do not error out if suggested module not found.

This fixes FS#1422.
(cherry picked from commit 806d4f1879fd9c8797ddb81461bb96007eae7e74)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>
[cmake,release] Test version with cmake and fix requiredness.

Before this patch we always relied on dunecontrol/pkg-config to check
for the correct version. With this patch we include this functionality
also when building packges with dunecontrol for this use part of the version
checking of cmake (or pkg-config if there are packages without CMake support).
Basically we let CMake check wether the major and minor version matches and
afterwards use the information from the dune.module file. This should make
it possible to have several versions of DUNE installed and still always use
the correct version. During fixing these issues we noticed that our version
files were not recognized because the carried the wrong name. Now we use the
correct name <dune-module>-config-version.cmake.
(cherry picked from commit 2d20c1672f2d4c8ef389dce932e23206c60968d3)

Resoved conflicts:
	cmake/modules/DuneMacros.cmake