PIR fixes:
Separate out the PIR code so motion_detect.py can be run by non-root
for things like --help or using a USB or gphoto2 camera.
Use polling instead of callbacks for the PIR, since the callback
GPIO mechanism currently crashes Python. (But leave the code available
for easy switching in case they ever fix callbacks.)
Updates to produce csv output for PEEC
Mostly refactoring and code cleanup
Clean up results that got messed up during refactoring
Add crescent visibility information