Simplify GPIO IRC code by use of arrays and collect state in single global structure.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>