Fix both edge bug in gpio_irq_api.c

Fixes #22