mraa: initial implementation of "hooks"

* Should allow for more platform quirks to be handled by mraa without
* massive conditional areas per platform.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>