pc: Fix and clean up PIC-to-APIC IRQ path