The quality of the latest flex 2.5.37 release is pretty poor. The
man page displayed the wrong version, the code doesn't compile with
GCC 4.7, the new lerrs_fatal function missing a protocol and then
given the wrong type once when it was called. Some of the errors
could have been fixed with higher WARNS settings but these patches
applied over the flex vendor branch should fix the bugs.

To prepare for the import of the latest flex, am-utils needs a tweak.
This allows both the old flex and the new flex to build it. It is the
only software that failed to build out of the box with the new flex.

The following patterns were previously active.
They have been commented out because the system "make" will pick up build
products in the source tree causing strange build failures. The benefit
of avoiding an accidental commit of a binary is quickly offset by the
liability of chasing build failures caused by "invisible" files. This
has burned a few people already and even the source of bug reports.

Add CPUID to subqueue mapping method to ifaltq. Driver could provide
its own CPUID to subqueue mapping method through ifnet.if_mapsubq,
which is used when ALTQ's packet scheduler is not enabled. ALTQ's
packet schedulers always map CPUID to the default subqueue.

Put the plain queue information, e.g. queue header and tail, serializer,
packet staging scoreboard and ifnet.if_start schedule netmsg etc. into
its own structure (subqueue). ifaltq structure could have multiple of
subqueues based on the count that drivers can specify.

Subqueue's enqueue, dequeue, purging and states updating are protected
by the subqueue's serializer, so for hardwares supporting multiple TX
queues, contention on queuing operation could be greatly reduced.

The subqueue is passed to if_start to let the driver know which hardware
TX queue to work on. Only the related driver's TX queue serializer will
be held, so for hardwares supporting multiple TX queues, contention on
driver's TX queue serializer could be greatly reduced.

Bunch of ifsq_ prefixed functions are added, which is used to perform
various operations on subqueues. Commonly used ifq_ prefixed functions
are still kept mainly for the drivers which do not support multiple TX
queues (well, these functions also ease the netif/ convertion in this
step :).

All of the pseudo network devices under sys/net are converted to use the
new subqueue operation. netproto/802_11 is converted too. igb(4) is
converted to use the new subqueue operation, the rest of the network
drivers are only changed for the if_start interface modification.

For ALTQs which have packet scheduler enabled, only the first subqueue
is used (*).

if_cpuid and if_npoll_cpuid are merged and moved into ifaltq as
altq_cpuid, which indicates the owner CPU of the tx queue. Since
we already have code in if_start_dispatch() to catching tx queue
owner CPU changes, this merging is quite safe.

* The Sandybridge and later cpus use a virtually indexed, physically tagged
L1 cache, and tend to be sensitive to substantially different memory
addresses winding up on the same cache line. Matrix operations (primarily
benchmarks) can cause these sorts of effects.

* Disable dmalloc on 64-bit systems, use nmalloc for everything for now.
dmalloc appears to have some severe fragmentation and/or leak issues
in long running programs (aka xulrunner) which are worse than nmalloc.