added event handler functions

library now sets up event handler for buttons and imu interrupt.  User
now sends function pointers for button presses. ctrl-c signal handler
now added to main lib.