Try to improve GPIO speed by calling gpio.setup less

This version should cache already-setup pins in an object, and
only setup again if the direction changes, or if the pin is not
cached as exported. Additionally, this version adds a handler for
the process 'exit' event, which should unexport all pins when the
app is killed or exited.
Improve speed in GPIO

Have tested with simple setup. There is a few hundred ms delay between swiping
and having the electric signal sent, but this seems largely to be due to network
latency, judging from log output on receiving a response. In general it is pretty
satisfactory.
Merge pull request #2 from caitp/speed

Try to improve GPIO speed by calling gpio.setup less