ERT: link to the threads library of the OS

this is required to make the opm-core build succeed if ERT was build
with -DBUILD_SHARED_LIBS=OFF . (without it, I get errors like

    /home/and/src/ert/devel/libert_util/src/thread_pool_posix.c:328: error: undefined reference to 'pthread_create'
Make code compile with dune trunk version (ie 3.0-git). This should include support for
dune 2.3.
Properly handle defaulted well reference depths.
Merge pull request #619 from andlaus/allow_static_ERT

ERT: link to the pthreads library
Merge pull request #624 from atgeirr/default-wellrefdepth

Properly handle defaulted well reference depths.
Don't use variable-length arrays

We only support up to 'BlackoilPhases::MaxNumPhases' different
phases (and components), so there's no need to pretend otherwise.
Consistently refer to BlackoilPhases::Aqua

This avoids confusion.
Initialise saturation points for Pc scaling

This gives predictable failure modes although the actual behaviour
is (probably) unchanged.
swatInitScaling(): Rename array size parameter

This commit renames the 'np' parameter used to allocate small arrays
for saturations and capillary pressures to 'max_np' to better
reflect its purpose.

Suggested by: [at] atgeirr
swatInitScaling(): Name magic constant

The constant 1.0e-8 was used as a threshold to distinguish "low"
from "high" capillary pressure values.  Introduce acutual constant
"pc_low_threshold" to clarify that role.

Suggested by: [at] atgeirr
swatInitScaling(): Remove EOL whitespace

This commit removes several instances of EOL whitespace in function
'swatInitScaling()'.  Aesthetic only.  No functional changes.

Suggested by: [at] atgeirr
swatInitScaling(): Abide by OPM coding conventions

This commit attaches the reference-signifying ampersand to the type
as is preferred in the OPM code base.

Suggested by: [at] atgeirr
Merge pull request #620 from bska/satfunc-minor-issues

Correct a number of minor issues in capillary pressure scaling code
Merge pull request #623 from robertk-iris/dune-3.0-compat

Make code compile with dune trunk version (ie 3.0-git). This should incl...
Merge branch 'master' of git://github.com/OPM/opm-core

* 'master' of git://github.com/OPM/opm-core:
  swatInitScaling(): Abide by OPM coding conventions
  swatInitScaling(): Remove EOL whitespace
  swatInitScaling(): Name magic constant
  swatInitScaling(): Rename array size parameter
  Initialise saturation points for Pc scaling
  Consistently refer to BlackoilPhases::Aqua
  Don't use variable-length arrays
  Properly handle defaulted well reference depths.
  Make code compile with dune trunk version (ie 3.0-git). This should include support for dune 2.3.
  ERT: link to the threads library of the OS