apic: add ioapic_get_dev() method
(cherry picked from commit ea4e4449b85593025c2eb31bb642732971d96225)