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'
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.