pf - clear M_HASH in a few more places, cleanups, structure size change!

* Clear the M_HASH flag in a few more places where headers get rewritten.

* bzero the key before populating it.  Shouldn't be necessary but add as a
  safety for possible future use cases.

* Add more fields to struct pfsync_state.  This requires pfvar.h to be
  reinstalled, the pf module and the pfctl program to be rebuilt.
  (suggest buildworld + buildkernel).

  pickup_mode and cpuid added.  Also added reserved fields so future
  additions can be made without changing the structure size again.

* Other minor cleanups.

* WARNING ON RDR, PASS IN / PASS OUT combinations.  RDR rules create state
  on the input path.  Further packets on the input path match the RDR
  state on input, but the *return* packet path will match the RDR state on
  output.

  This means that if you have a PASS OUT rule that matches the RDR input path
  on the output side of the translation, it will also create state, and if
  you have a PASS IN rule that matches the RDR return packet path, it will
  also create state on the input path for that packet.

  PF users must be sure that if such rules exist, they are either specified
  to not create keep state, use the default keep state (which allows pickups
  and sloppy tcp tests), or explicitly specify keep state with sloppy tcp
  tests.  This is because these PASS rules will only see one side of the
  TCP connection because the RDR state will suck up the other side.
udp: For connected socket, don't rehash sending datagram

Since it has already been in the correct netisr.
Fix buildkernel without INVARIANTS.

Reported-by: Andrey Oktyabrskiy <ano@bestmx.net>
usb4bsd: make uaudio work

Submitted-By: Vasily Postnicov <shamaz.mazum@gmail.com>
Update devd(8)'s usb.conf for uaudio(4).
snd_uaudio.4: Sync with FreeBSD for a few changes.
Create snd_blah.4 -> blah.4 MLINKS.

Suggested-by: profmakx
Make uaudio(4) compilable into the kernel.
PF - Force 'sloppy' when establishing conflicting state

* Check whether a PASS IN or PASS OUT conflicts with established translation
  state in the opposite direction.  When this situation is detected, one
  of the PASS rules can establish state (and with recent SMP work, both
  PASS rules will establish state).  This causes problems because the PASS
  rules may only see one direction of the connection due to the RDR or NAT.
  If strict TCP sequence space checking occurs the PASS state can generate
  RSTs.

  To fix this we force the SLOPPY flag to be set for any PASS state being
  established in the face of a conflict against a translation rule.  This
  allows packet flow to short-cut through the state table and is preferable
  to disallowing establishment of the state because that would force a
  full rules scan (and repeated conflict/failure) for every packet.

				History

* PASS IN and PASS OUT rules can interfere with a RDR rule when strict
  sequence space tests are made for established TCP state.

  In pre-SMP PF, including in FreeBSD and probably also in other BSDs,
  two active states are generally established, one for RDR and one for the
  PASS IN.  PF attempts to establish state for the PASS OUT but hits a
  conflict against the established RDR state and fails.

  However, in this situation no short-cut state is established in one
  direction and ALL packets that would have matched the failed PASS OUT
  will cause a full rules scan.

* With the SMP work, the PASS OUT conflict was no longer detected because
  the RDR state is on a different RBTREE than the PASS OUT state.  This
  allowed conflicting state for both PASS IN and PASS OUT to be established.

* Conflicting state in either direction is capable of generating spurious
  RSTs against the RDR rule.  One direction for sure, the other will generate
  RSTs but possibly be obscured by the translation rule (that is, the RST
  ends up going somewhere unexpected), so the RDR rule still works.  But
  the problem remains.
tools/netrate: Use ncpus as # of instance by default
tcp: Fix getcred

- Migrate to the target cpu before looking up tcp inpcb.
- Save a copy of the ucred then do SYSCTL_OUT, which could block.
  It is not MPSAFE to do the SYSCTL_OUT even on the target CPU;
  the socket might be ripped when SYSCTL_OUT blocked.
udp: Simplify getcred

- No need to compare cpuid before calling lwkt_migratecpu(), which
  does necessary check itself.
- Streamline the code path a little bit.
Remove csa.4. It is really snd_csa.4 and a csa.4 MLINK will be created.
tools/netrate/netperf: Switch to err(3)
bpf: Use uint32_t for scratch memory.

It is never used as signed array.

Dragonfly-issue: http://bugs.dragonflybsd.org/issues/2722
Submitted-by: guy
localdaemons should care for scripts dependencies in $local_startup too
build - Remove csa.4 remainders

* Remove csa.4 from the MAN variable.  Fixes a buildworld error.
nfsd, mountd - daemonize earlier

* Daemonize these services earlier so name lookup stalls do
  not stall the system startup.  This is particularly important
  if the server itself is responsible for a local network, we
  don't want the server to fail to boot if the internet is not
  available.
tcp: Fix tcp_drain_oncpu()

Marker inpcb should always be moved.
systat - Add -altq display, bug fixes

* Add systat -altq.  This displays altq packet statistics in a nice
  [ifname x altqname] matrix.  Packets, bytes, and drops are displayed.

  Previously the only way to do this was to use 'pfctl -s queue -vvv'
  which is formatted so horribly that picking information out of it
  at a glance is impossible.

  Example usage:  systat -altq 1

* Correct a bug in -ifstat that caused the statistics to not display
  when switching out and then back into the ifstat display.