Move the common irq handling code out of trap.c into pc/irq.c so that it can be shared between 386 and amd64 ports.