kernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.

When a syscons process put itself into MOUSE_MODE, a process-hold
was being placed to stabilize the process for signal delivery. The
hold was not being released on process exit, however.

This change reworks syscons to install a per-process flag as to
whether it is in MOUSE_MODE or not and to remove the excess hold on
exit(). It also cleans up the error handling and prevents stale
process pointers from lingering in syscons stat structures.

Reported-by: mneumann, Studbolt
Closes-bug: 2521
libc/libthread_xu - Fix segfault caused by libpthread used before initialised

If a binary has libpthread as dependency and is linked against libintl,
or any other library that uses pthread locking primitives from libc
without depending on libpthread itself it can happen that functions
from libpthread are called before libpthread's constructor has been
called. This leads to a segfault.

This fix adds a weak symbold to libc, namely _pthread_init_early,
which is called from a libc constructor function and therefore makes
sure that libpthread is initialised early enough.

Thanks to Simon Schubert, Angelos Oikonomopoulos, and Sascha Wildner
for the support in debugging this.
libthread_xu: Remove unnecessary calls to _thr_check_init()

With the previous commit it becomes unnecessary to check whether
libpthread has been initialised. This gets rid of some checks in
hot codepaths.
pcidevs: Add device ID for Sundance ST201
ste: Add another PCI device ID for Sundance ST201

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2529
vr: Remove extra VR_ISR_RX_NOBUF test

Pointed-out-by: swildner@
tcp: Cache align tcp_stats

- tcp_stats is padded to multiple cache line size; add comment about it
- Cache align the per-cpu tcp_stats array
kernel/acpi: Fix -Wundef.
kernel/wlan: Fix -Wundef.
kernel/virtio: Fix -Wundef.
kernel/mfi: Move the dereference of 'sc' below the NULL check.
kernel/ed: Fix -Wundef.
kernel/em/emx: Fix -Wundef.
bsd.kern.mk: -Wno-unused-but-set-variable is gcc47 specific.
natacontrol(8): s/atacontrol/natacontrol/
natacontrol(8): Add commands to tweak power/acoustic management features.

Sometimes disks designed to operate in low power mode by default
constantly spin up/down during operation which leads to reduced
performance.

This commit adds the 'feature' command to natacontrol(8) which
can be used to tweak the 'advanced power management' and 'automatic
acoustic management' features. Their current setting could already
be viewed before this commit using the 'natacontrol cap' command.

I'd like this to be possible with camcontrol(8) too for CAM attached
disks, but afaict these are ATA specific features so I guess we'd
have to integrate ATA into CAM too before that is possible.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2531>
Reported-by:   Maurizio Lombardi <m.lombardi85@gmail.com>
Taken-from:    FreeBSD PR 81692
Tested-by:     Maurizio Lombardi <m.lombardi85@gmail.com>
ip: Cache align ip_stats

- ip_stats is padded to multiple cache line size; add comment about it
- Cache align the per-cpu ip_stats array
kernel/cpu_topology: They are just bits, not BITS.
lnc: Call ether_ifattach() before lance_stop()

So ifnet is properly setup.

While I'm here, remove no longer needed lance_attach() and don't return
error code from lance_config(), which returned no error at all.

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2528
udp: Make stats per-cpu