torsock's configure.ac: avoid tests which have both -pie and -static
Building and linking with both -pie and -static is not supported for some toolchain combinations (eg. glibc or binutil's gold). Yet this combination is hit if the check for gcc hardening is done before AC_PROG_LIBTOOL and AC_ENABLE_STATIC. We avoid the issue by moving the gcc hardening check to after AC_PROG_LIBTOOL and friends.
See:
https://sourceware.org/bugzilla/show_bug.cgi?id=17826 https://sourceware.org/bugzilla/show_bug.cgi?id=16428 https://bugs.gentoo.org/show_bug.cgi?id=533862