Merge pull request #390 from andlaus/fix_averages

fix the averages wrt negative values and divisions by zero
Spline: fix a few issues with the monotonic() methods

This should fix the common case where the curve is non-constant within
an intervall. I'm not really sure whether it's correct in all corner
cases, though.

this fixes the eWoms test case for the blackoil model which failed in
debug mode due to some asserts incorrectly triggering...
Fix null-pointer dereference during well construction

The three-argument WellsManager constructor needs access to the real
permeability field lest a null-pointer dereference result when the
problem actually contains any wells.
RESV: Ignore phase distribution for non-PRODUCERs

The WellsManager class handles INJECTORS by assigning a phase
distribution (W->ctrls[i]->distr) that coincides with the injected
fluid for the corresponding well (e.g., {1,0,0} for WATER injectors in
a three-phase WATER/OIL/GAS simulation).  This, however, meshes poorly
with the restriction that all phase components must be ONE in the case
of wells constrained by total reservoir volume flow targets (RESV)
that was introduced in commit b7d1634.

This change-set limits the restriction on phase distributions to
PRODUCERs only and is a tentative solution to GitHub PR #360.
assemble_well_contrib(): Fix misprint in comment.
Provide stream that ignores everything written to it

Use this stream when you want a straight code path, but also be able
to disable output at will.
Disable output to console if parameter quiet = true

If the standard output is not desirable, it can be suppressed and
custom output can be written through the timestep_completed event
instead.
Merge pull request #392 from rolk/392_quiet

Add option to suppress output in SimulatorIncompTwophase
spline: use evalDerivative_() instead of evalDerivative() if the segment index is known

thanks to @bska for catching this!
spline: actually return something in evalDerivative() in the extrapolate case

once more, thanks to @bska to catching this!
Merge pull request #394 from andlaus/fix_spline_monotonic

Spline: fix a few issues with the monotonic() methods
Instructions on how to build prerequisites on MacOS X

Although it is possible using the GNU toolchain, there is
probably a larger base which has the Apple toolchain and want to
use that.
Remove unused "typedef"s

CLang and recent versions of GCC warn about unused "typedef"s.  This
change-set removes currently known instances in opm-core.
Merge pull request #396 from bska/resv-injectors

Tentative solution to problem of RESV injectors in `ifs_tpfa.c`
Merge pull request #399 from rolk/399_macosx

Add instructions on how to build prerequisites on MacOS X
Merge pull request #400 from bska/Wunused

Remove unused "typedef"s
Merge pull request #395 from bska/nullptr-deref

Fix null-pointer dereference during well construction
Remove unneeded term, fixing oil injecting behaviour.

The 'comp_term' is supposed to be a total divergence term, which is supposed
to be zero for incompressible flow. It was added for improved robustness in
stagnant areas, but as implemented it would not be computed properly for
oil injection scenarios, due to the convention for two-phase transport
source terms (positive terms are inflow of first phase [water], negative
terms are total outflow).
Use dSYM bundles as debugging containers (on MacOS X)

gdb on MacOS X does not seem to be very fond of "flat" dSYM files, but
it can read the bundle variant fine. Thus we change that to enable
debugging across several tools.
Merge pull request #402 from rolk/401_dsym

Use dSYM bundles as debugging containers (on MacOS X)