Change configure to allow statically linking libpcre.

Statically linking libpcre requires using -lpthread, which is added
when building Suricata, but not while checking for libpcre in configure.

Replaces PR 887 to address Victor's review comments.

Change from static-1 now use -lpthread instead of -pthread.

Passes PR Script:
https://buildbot.suricata-ids.org/builders/ken-tilera-pcap/builds/62
https://buildbot.suricata-ids.org/builders/ken-tilera/builds/128