Remake of IRQ handling from slaves

Each IRQ from slave increases its IRQ flag
each time a IRQ is received and decreased each
time a IRQ job is executed.