unbork fallout from newlock2 merge:
- reinitializing video after X exits works again
- backlight levels should be right again
Misc KNF and cosmetics.
Only deal with isa dma stuff if this is available/needed.  Fixes the build
of kernels when, e.g. the audio driver is disabled.

Per cube@'s suggestion.
Pull in power management changes from private branch.
dopowerhooks is going away; use pnp_global_transition instead
Sync with HEAD.
Convert the old powerhook to a pnp power management handler, based
on the azalia power management handler and what was here before.
Factor out the hardware initialization code in ahcisata_core.c,
and provide them to the pci frontend, which has now grown its own
softc and a power management handler.

There may be one too many re-initializations done on resume (witness
the multiple kernel messages from ahcisata), but at least this is
sufficient to get the Lenovo T60 to come out of resume with a
working disk controller and disk.
Don't bother running vga_initregs on resume.
Don't run resume hooks on failure, and certainly don't run them twice.
Switch to the console screen on suspend, and back to the previous screen
on resume.
Run power handlers for sibling devices in reverse order on suspend; this
matters for mainbus (we can't power off the CPU or ioapic before PCI,
for example).
Implement i386 cpu power handler; offlines APs on suspend, and onlines them
on resume. Doesn't solve the SMP issue, but it's a start.
Make this compile again -- sys/php.h does not exist, and since sys/device.h
pulls in sys/pnp.h anyway, don't bother.
In the audio device policy, don't send two SET_STATE requests on an open
action. Resolves issues with dysfunctional mixers after resume.
Convert auich powerhook to pnp power handler (untested).
Add minimal power management support for the generic pcib driver.
Make sure that we clear fixed power button events on resume. ACPI 3.0 says
we should do this, presumably to work around buggy firmware. Fixes issues
on some machines where when waking with the power button, a power button
event is received by the kernel after resume and the machine will enter
S5 (poweroff) automatically. Fix confirmed by Jukka Salmi on current-users
on a Thinkpad X40.
No need to be so loud on resume.
Since ichlpcib calls pcibattach, we need to ensure that pcibattach doesn't
try to overwrite a power handler that has already been registered.