kernel/acpi: Sync acpi_pci_link with FreeBSD.
* Fix use-after-free bug for extended IRQ resource[1].
* Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
that uses non-ISA IRQs but use a plain IRQ resource in _CRS. However,
a non-ISA IRQ can't fit into a plain IRQ resource. If we encounter a
link like this, build the resource buffer from _PRS instead of _CRS.
* Set the correct size of the end tag in a resource buffer.
* Make MALLOC_DEFINEs that have no corresponding MALLOC_DECLAREs static.
Reviewed-and-tested-by: sephe