Add alternative gpio_port implementation

Main change is to make it single threaded to
avoid random crashes on the BeagleBoneBlack.

Also:
  - Added support for getting rising vs.
    falling when registering for interrupts on
    both edges.
  - Allow reads on output pins so that you
    can see what they're currently set to.
  - Reduce prints; exit in more places when
    things go wrong.