Unstick bgpctl reload after reloading a bgpd.conf with errors.

ok claudio, benno
Add a new malloc option 'U' => "Free unmap" that does the guarding/
unmapping of freed allocations without disabling chunk randomisation
like the "Freeguard" ('F') option does. Make security 'S' option
use 'U' and not 'F'.

Rationale: guarding with no chunk randomisation is great for debugging
use-after-free, but chunk randomisation offers better defence against
"heap feng shui" style attacks that depend on carefully constructing a
particular heap layout so we should leave this enabled when requesting
security options.
Add a "kick counter" that gets incremented on each command, to detect
clients that don't do their best to do something useful, and just hog
the session.  When that kick counter reaches the limit, the client is
disconnected.  The counter is reset after the first HELO/EHLO command,
after tls is established, after a succesful authentication, and after
a message is accepted. It is decremented when a RCPT is accepted.

ok gilles@
Avoid some misaligned access on sparc64 (at least) by bcopy()'ing
in_addr_t values into s_addr's rather than assigning them.

Possibly not the ideal solution, but at least dhclient will work
again on sparc64.
Remove 13 years old compiler bug workaround on m68k. Apparently fixed or swept
under the rug as part of the bunch of compiler fixes in the last 10+ years.
No objection from espie@ (who doesn't remember exactly what the issue used to
be)
Introduce better and simpler producer/consumer queue iterator
implementation that is usable for both producer (rq, wq, mq)
and consumer (eq, cq) rings.
Obligatory second oce commit for tonight. No binary change.

ok mikeb@
s/OCE_DMAPTR/OCE_MEM_KVA/ and don't require a type
While this identical idiom caused problems when building an ifaliasreq
to *add* an address, here (building an ifaliasreq to delete an
address) it worked fine. But change it to the bcopy() dance that
works in the adding case just to be consistant until a sparc64/gcc
guru is cornered in a bar with a full keg of guiness.
local variables are only used in functions.
Add missing RCS Ids.

ok sthen@
Handle elantech touchpad buttons in a common code path for all
hardware variants. ok shadchin mikeb mpi
This should be void.
Don't leak a file descriptor when testing for permissions, also make
sure directory is executable, otherwise we can't list it.

Found by and original diff from RustyBSD.

While here, strlen returns a size_t not an int.

ok florian.
kill dead assignment, found by llvm

ok haesbaert, lum, benno
fix potential memory leak, found by llvm

ok haesbaert, lum, benno
Various fixes/tweaks for resolv.conf handling:

1) Don't leak a file descriptor if there are no contents for
resolv.conf.
2) Allow for only resolv.conf.tail to go into resolv.conf.
3) Don't need to pass around interface name when creating resolv.conf.
4) Don't leave 0 length resolv.conf lying around if there are no
contents.
Let this build again. diff from deraadt "Sure you can commit that" deraadt@

Conflicts:

	sys/arch/beagle/dev/omehci.c
No need to pass interface name around when creating routes.
No need to pass interface name around when flushing routes.
Use consistant initialization idiom to reduce confusion.