Don't use ERR_remove_thread_state() with OpenSSL 1.1.0
Don't use ERR_remove_thread_state() with OpenSSL 1.1.0

It's deprecated and causes compile-time warnings. We don't want to
fallback to ERR_remove_state() either as it's similarly deprecated.

This commit adds a helper functions to hide the #ifdef mess between
the various openssl versions.

Signed-off-by: Christophe Fergeau <05b95054a663c388a4e33d95828cb30f0370f8ef@redhat.com>

Tatsh/libimobiledevice,libimobiledevice-win32/libimobiledevice,Tatsh/libimobiledevice,libimobiledevice-win32/libimobiledevice,libimobiledevice-win32/libimobiledevice,libimobiledevice/libimobiledevice,Tatsh/libimobiledevice,libimobiledevice-win32/libimobiledevice,libimobiledevice/libimobiledevice,Tatsh/libimobiledevice