Implemented debounce for Arduino Yun

Implemented debounce on triggers, also added support for rising and falling edge triggers plus some
improved error handling cleanup. Rising/falling edge support has not been integrated into simio yet.

Change-Id: Id55288dc3dac3d5ef9aca03701ca6742857376da
Signed-off-by: Greg Burns <gburns@qce.qualcomm.com>