x86, irq: Rename gsi_end gsi_top, and fix off by one errors