Add code to set and reset open-drain mode on the bus when requested.

Submitted by:	Michal Meloun <meloun@miracle.cz>
Rewrap long lines; no functional changes.

Submitted by:	Michal Meloun <meloun@miracle.cz>
Remove support for FreeBSD 7 and really old FreeBSD 8. The classifiers
have been in the base for a while, so the gymnastics here aren't
needed. In addition, the bugs in subr_disk.c have been fixed since
2009, so there's no need for an identical copy of it in the tree
anymore. There's really no need to binary patch g_io_request, so let's
get rid of the code (not compiled in anymore) lest others think it is
a good idea.
Remove comments relevant to 6.x only.
When command and data interrupts have been aggregated together, don't do
the data-completed processing if a command-error interrupt is also asserted.

Reviewed by:	Michal Meloun <meloun@miracle.cz>
Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around
TI OMAP controllers which will return the reset-in-progress bit as zero if
you read the status register too fast after setting the reset bit.

The zero is apparently from a stale snapshot of the internal state presented
in the interface register, and leads to a false indication that the reset
is complete when it either hasn't started yet or is in-progress.  The
workaround is to first loop until the bit is seen as asserted, then do the
normal loop waiting to see it de-asserted.

Submitted by:	Michal Meloun <meloun@miracle.cz>
Log mmc and sd command failures.  Reporting of routine expected errors,
such as timeouts while probing a bus or testing for a feature, is
squelched.  Also, error reporting is limited to 5 events per second,
because when an sdcard goes bad on a low-end embedded board, flooding
the console at high speed isn't helpful.

Original logging code contributed by Michal Meloun, but then I fancied
it up with squelching and ppsratecheck.
Various 8259 device model improvements:

- implement 8259 "polled" mode.
- set 'atpic->sfn' if bit 4 in ICW4 is set during master initialization.
- report error if guest tries to enable the "special mask" mode.

Differential Revision:	https://reviews.freebsd.org/D1328
Reviewed by:		tychon
Reported by:		grehan
Tested by:		grehan
MFC after:		1 week
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/userlandenhanced