Fix the stunnel ucontext-related problems using a patch from the author,
Also, add the build-time WITH_FORK, WITH_PTHREAD, and WITH_UCONTEXT knobs
to control the stunnel threading model used, based on Vasil Dimov's PR's
with some modifications .
While I'm here, add in a <sys/types.h> inclusion that seems to be needed
for <ucontext.h> at least on FreeBSD 6.0/sparc64.
Reported by: many
Pointy hat to: roam (myself) for both not noticing this and then letting
it linger for a while
Obtained from: Michael Trojnara's BSD patch from
PR: 81289, 82202 
Submitted by: Vasil Dimov