gpio: adding interrupt

this is inspired by Dave Cheney's gpio library and his work on EPOLL