build system: prevent endless loop when using dunecontrol

this seems to be a bug in cmake 2.8.10.2: if the user sets the
CMAKE_CXX_COMPILER variable for a build directory where this variable
has already been set, one gets an endless loop. This stings especially
if using the dunecontrol compatibility layer as the compiler flags are
unconditionally set via the CXX_FLAGS environment variable in the
options file. Running duncontrol on a module twice will thus trigger the
infinite loop if some compiler flags are set by the user.

The solution is relatively simple: Delete the CMakeFiles directory
before calling cmake. for the dunecontrol compatibility mode, we do
this in the configure script. For details about the cmake bug, see
http://www.cmake.org/Bug/view.php?id=14119
configure script: also delete the cmake cache

This replicates the autotools behavior and was suggested by Roland
Kaufmann.
configure script: add a stub implementation for the --config-cache argument

so far, it is only a flag which prevents the cache from being
deleted. To warn the user about a potential infinite loop, a warning
is printed if this flag was specified and some compiler or some compiler
flags were set by the user. This idea was proposed by Roland Kaufmann.
include the latest review comments by Roland Kaufmann
Merge pull request #430 from andlaus/fix_infinite_configure

build system: prevent endless loop when using dunecontrol
fix syntax error in configure shell script

strangly enough, it seems to work like it was in some circumstances...
Merge pull request #436 from rolk/436_searchdir

Search in build/ sub-dir if only suite root is given
Merge pull request #420 from rolk/420_state

Refactor BlackoilState and TwophaseState to have a common interface for writing
Merge pull request #439 from andlaus/fix_configure_syntax_error

fix syntax error in configure shell script
Add generic version of getXxxValue

This allows us to call getIntegerValue/getFloatingPointValue from
generic code where the type to be used is a template parameter.
Replace data series handling with RAII type

The EclipseKeyword class takes care of cleaning up the handle after we
are done using it, and provides several convenience constructors that
make the code read easier.
Replace file name handling with RAII type
Centralize all time conversion

Remove duplicate code into a common helper function
Replace grid construction with RAII type
Make grid writing part of the grid type
Replace init setup with RAII type
Replace restart and solution handling with RAII type
Replace summary variables with RAII type
Remove now unused member holding starting time

If we restart from a later time, then the SimulatorTimer should be
restarted in that state as well, so it is already always a reflection
of how far we've progressed in the input file's schedule.
Updated copyright statement at top