gpio: workaround for immediate return from poll

Read gpio value before waiting for changes, otherwise poll() returns
immediately.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
gpio: add support for 'both' edge mode

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Merge pull request #7 from yegorich/interrupt

BOTH edge interrupt support, and fix for sysfs GPIO poll issue