Fix OpenSSL detection when an explicit path is given

The previous OpenSSL detection was skipping the library checks when an
explicit path was presented. Resulting in no -lssl flag being passed to
the linker.

Rational for this fix:
 pkg-config presents location-neutral details.

 The explicit checks are likewise neutral provided the LIBS environment
  variable has been set with the explicit path.

 User presented path must be used regardless of which the library checks
  are used in detection.

So...

 Always perform the checks with optionally set LIBS and keep the
 user provided path explicitly separate from the pkg-config *_LIBS
 variable. Only assemble the parts into SSLLIB once all have been
 identified.
Cleanup: Make crypt(3) detection dependent on the helpers that use it

Only run detection for crypt(3) support when the NCSA and getpwnam
helpers which use it are to be built.

Also, move shadow.h detection to depend on getpwnam helper which is the
only code using it.

Also, shuffle the libcrypt and libmd5 detection up into the section with
other crypto libraries so they are known in advance of helper detections
which may require libcrypt.
Cleanup: Polish Windows automake conditionals

Squid coding guidelines are that AM_CONDITIONAL definitions are named
ENABLE_*.
MemBuf fix: empty MemBufs are not NULL terminated

This is may cause problems in some cases where the code assume that the MemBuf
is always NULL terminated. For example when an ErrorState object try to use
an empty errorpage template.

This patch terminates the (empty) MemBuf on MemBuf::init method.
Fix typo in getpwname detection