ERT: link to the pthreads library

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'
ECL problem: move the code which potentially throws into the finishInit() method

this avoids some segfaults due to half constructed objects if an
exception is thrown on initialization.