[configure] properly detect if curl was compiled statically with openssl

This attempts to properly fix the issues raised in #3112
as noted by @elupus the original "fix" is broken on at least linux when curl is linked dynamically and/or with gnutls

This PR therefore takes another approach: We check the curl DSO directly for the relevant openssl symbol.
A quick jenkins test detected it as expected on android, rpi(and linux64 with unified deps), darwin compiled fine as well, but I'm not sure if readelf works the same there or is even available 
@memphiz can you sanity check it please?

@koying @arnova please test if your original issue is fixed