Avoid CMake warnings for unused variables

We want to be able to build the examples using the same configuration
parameters as the libraries.
Add forgotten memory allocation

In addition to allocating memory for the upscaled porosity, a similar
allocation should of course be done for the permeability as well.
Allocate correct number of items

pos[number] will point to the last element of pos when number is the
count of elements; number+1 is an index-out-of-bounds op. which gives
the wrong result.
Fix typo that caused data to be initialized wrongly
Fix assignment into two column array

The previous version would assign haphazardly into the brine saturation
instead since it assumed that there was only one phase.
Assign the brine saturation also

This was presumable planned done somewhere else which was then
refactored away later.
Add input sanity check
Fix structure array assignment bug

There are two items per "record"; we must multiply with that number
to get the the correct start before adding the offset.
Correct which element is primary neighbour to a face
Merge pull request #34 from rolk/034_bugs

Various bug fixes