[GTK] Reserve display of partial file indication (PFS) to partial sources.

This fixes a bug whereby we could have <PFS 100.00%> indications displayed
for queued sources.
assertion_message(): say "at location", not "in location".
rand31: moved self-initialization checks to the API entry points.
Fixed improper "good" alt-loc flagging from uploaders, leading to wrong mesh.

When parsing X-Alt headers from uploaders, we were blindly calling the
dmesh_good_mark() routine to flag the downloader as a good source.  Howerver,
this must be done only when the downloader advertises itself in the X-Alt
header, otherwise dmesh_good_mark() will blindly mark as good a negative
alternate location we could have for that host.

This resulted in the wrong mesh propagation since bad alternate locations
could then later be propagated further, triggering immediate downloads from
the server even if it was previously determined that the server did not host
that file.

This happened when two gtk-gnutella servents were both dowloading the same
file without necessarily offering it at the same time.  Both were returning
a HTTP 404 status, which led to a negative alternate location marking, but
since both were also wrongly calling dmesh_good_mark(), they immediately
re-attempted to download the file from each other, etc.. until the banning
code kicked in and banned the remote gtk-gnutella for too frequent connections.
Leave banned entries in the bad mesh for at least 5 minutes.

When an entry is put in the bad mesh, we veto any forceful removal through
dmesh_good_mark() for the next 5 minutes to avoid problems when a servent
returns 404 when asked for a file, yet advertises itself in the mesh when it
requests the file from us: we do not want to immediately lift the 404
indication.
After 3 X-Nalt reports, move source from download mesh to the banned mesh.

For a long time now, dmesh_negative_alt() was documented to do just that, but
it simply removed the source from the mesh and did not put it in the banned
mesh.  This caused further occurences from supposedly bad alt-locs to be
finally inserted back to the mesh.
Added host_addr_mask_net() to mask out trailing bits of IPv4 / IPv6 addresses.
dmesh_negative_alt(): evidence for badness must now come from distinct networks.

We're now masking out the trailing bits of the reporter to keep only the network
base address from which it originates.  This mitagates local collusion from
a hostile network to report an address bad.
Let s_minierror() and s_minicrit() attempt to dump a stacktrace.
thread_lock_dump(): tag unlocked spinlocks with UNLOCKED when dumping.

Regardless of whether the lock is held or not, always show the locking
point if compiled with SPINLOCK_DEBUG.
zlock(): use a macro, not an inlined routine, to get proper spinlock locations.
zalloc: must be systematic about zlock()/zunlock() calls to lock/unlock zones.

There were a few places where we used the old direct spinlock(&zone->lock)
call instead of doing zlock(), yet we used zunlock() to unlock, causing
improper tracking of the lock in the thread, not counting the unnecessary
penalty for private zones!
cq_free(): release mutex to prevent loud warning a shutdown time.
When the the crash handler child fails, append decorated stack from parent.

This usually happens when "gdb" is not installed on the platform and therefore
the exec() fails in the child, leading to no symbolic stack trace possibly if
the crash happened due to a SIGSEGV.

We now catch that from the parent and attempt to safely dump a decorated stack
trace to the crashlog file, with a copy on stderr and stdout.
Added eslist_remove() and eslist_remove_after().
Generalized eslist_insert_after() and elist_insert_after/before().

If the specified sibling is NULL, then insertion happens at the head or tail,
as appropriate.
Added ESLIST_FOREACH() and ELIST_FOREACH() macros.
Added eslist_rotate_left().
Allow embedded lists to be traversed as "circular" lists from any item.
Added ERBTREE_FOREACH() macro.