enable -lcrypto -lssl with all test programs directly.

This removes the need to specify each one individually.

ok doug@
use the correct HOST_OS for the Windows build

ok doug@
Improve and simplify function and header detection logic.

Simplify autoconf checks by using AC_CHECK_FUNCS/HEADERS.
Clarify some ambiguous dependencies around strnlen/strndup.
Unconditionally enable pidwraptest for all arc4random implementations.
Remove HAVE_VASPRINTF conditional, since asprintf requires vasprintf.

ok @doug
wrap arc4random header

ok @doug
Add an OpenSSL compatible ./config wrapper

This allows sofware expecting OpenSSL's config script, to a limited
extent, to continue building without changes.

Thanks to technion for pointing this out and providing the initial
patch.
update README to reflect current porting approach

ok beck@ deraadt@
override native arc4random_buf on OS X

While the native OS X implementation is fork-safe, it does not seed
safely, as of the latest released OS X libc sources, version 997.90.3.
It only uses weak sources of entropy if accessing /dev/urandom fails.

ok beck@ deraadt@
override native arc4random_buf on FreeBSD

The FreeBSD-native arc4random_buf implementation falls back to weak
sources of entropy if the sysctl fails. Remove these dangerous fallbacks
by overriding locally.

Unfortunately, pthread_atfork() is broken on FreeBSD (at least 9 and 10)
if a program does not link to -lthr. Callbacks registered with
pthread_atfork() simply fail silently. So, it is not always possible to
detect a PID wraparound. I wish we could do better.

This improves arc4random_buf's safety compared to the native FreeBSD
implementation. Tested on FreeBSD 9 and 10.

ok beck@ deraadt@
make 'autoreconf' work from dist tarball

We need to include VERSION for it to run.
Quiet clang warnings about unused arguments in general.

Check if we are using clang, rather than simply if we are on OS X.
Note: recent LLVM releases do not seem to need this anyway.