Fix C++ support

Without extern "C" definition a C++ program cannot link to the libsoc.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
headers: add include guards

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
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 #6 from yegorich/headers

Headers
Merge pull request #7 from yegorich/interrupt

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