ANSIfy
if we're in visual mode reading a command, check the termination value
of v_tcmd() and bail if it's not TERM_OK as opposed to in a more
specific case.  this is based on the NetBSD ^C fix but after
discussion with otto@.  while it did not affect the specific crash
it is more correct.
factorize SGMAP-mapped DMA map creation and destroy code

ok miod@, additional testing jsg@

from NetBSD
sync
de-register.
GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok
more GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok
last lot of GSSAPI related leaks detected by Coverity via
elad AT netbsd.org; reviewed by simon AT sxw.org.uk; deraadt@ ok
memory leaks detected by Coverity via elad AT netbsd.org;
deraadt@ ok

that should be all of them now
Lint should not complain about expressions of the form: ((x == y) == z)
because this is perfectly legal in C.  deraadt@ was seeing lint false
positives with the S_ISREG macro from stat.h.  So set m_eqwarn to 0 for
the EQ operator.  See xlint regress case #16.
Add a regression test for false positive with ((x == y) == z), fixed in
r1.31 of usr.bin/xlint/lint1/tree.c
shorten the setup of the xs timeout
the command queues are important so wrap them up in splbio
get rid of the CCB_READY check in ami_start, it is subtly broken and slows
things down. this path is easy to verify without this code so im just
dropping it.
move the drv_inq ioctl path to its own completion routine. all the cleanup
of the dmammem is now done in the ioctl, the completion routing simply
wakes it up.
switch the mgmt ioctl path to use the ioctl completion function.
remove the bits in the ccb for generalised handling of dmaable memory.

now that each code path that puts commands on the hardware has specific
completion routines, we dont have to deal with the memory magic in a
generic fashion.
introduce rt_if_remove which takes care of routing table updates for an
interface that is removed. use that from if.c and if_tun.c instead of
re-implementing in the latter case. ok claudio
shrink the ccb even more. instead of having a "wakeup" member to say when
the ioctl paths can wake up, check the state of the ccb instead. when the
ccb becomes READY again then the command has completed.
finer grained use of splbio in the ioctl paths. only use it when dealing
with the ccb queues rather than over the whole ioctl.

also get rid of the CMD_WAIT flag which is used to restrict the ioctl to
only one caller at a time. this is actually protecting from overuse of
ccbs for management tasks (like bioctl) by making sure the scsi paths
will always have their ccbs. replace the flag with a real lock so that
callers can sleep till the mgmt ccb is free, rather than returning EBUSY