Valgrind and generic cleanups.

Started with changing some malloc()s to calloc()s to keep valgrind happy
and avoid uninitialised bytes in crypto-code, and continued with a
couple of log message refining and source cleanup.
cf-serverd: classic protocol authentication messages etc sanitisation.
Lots of cleanups, check all values, got rid of mallocs, added better messages.
Fix 16_cf-serverd lan_open.srv tests to not connect over local loopback.
Do not send or receive negative numbers, might catch potential stack corruption or bad code.
A bit more logging/indentation stuff.
Check header consistency more thoroughly.
Do not cleanup global allocations if threads are still active.
Remove uninitialized buffers as source of entropy.
Small cleanups of the PRNG seeding code.
Add a LOUD warning if entropy is not enough

Should never happen since RAND_poll() is supposed to get as much entropy
as needed from the OS-specific pool.
Message was inaccurate.
Homogenous capitalisation.
Free cleanup.
lowercase
Unchecked malloc should be xmalloc.
Log in verbose which connection threads had to abort because of shutdown.
Disable printf format warnings on Windows.

Our wrapper supports more flags than vanilla Windows version, so they
are false positives.
Use %jd and %ju instead of PRIdMAX and PRIuMAX.

The problem is that on Windows PRI[du]MAX expands to a
Windows-specific printf flag, but we are using printf wrappers, which
do not understand that flag. The 'j' flag on the other hand, is not
supported by Windows, but *is* supported by our wrapper, so it's safe
to use.

One notable exception from in the commit is a scanf which uses
PRIdMAX. scanf is not covered by our wrappers at the moment, and has
no replacement, so we need to leave that as it is. sprintf is not
covered either, but can (and should) be replaced with snprintf.
Merge pull request #1845 from jimis/misc

Classic protocol and crypto cleanups.