Well, here is my first contribution. It works for me -- tested on the 60D.
I have included the full file and the diff. Let me know what you think.
Changes:
-The motion detection used a variable (K) to prevent it from shooting immediatly after starting live-view and after a picture. However, if you set up motion detection, and then entered live view, and used it for a bit, and then left live view, K was not reset. That meant that when you re-entered live view, it would take a shot right away, instead of waiting for the exposure to settle.
-Changed the menu entry for motion detection, added a configuration item for the sensitivity
-Change the live view detection: a circular buffer of the last 5 readings is kept now, and averaged. When the new reading is off of the average by more than the sensitivity, an image was taken.
I tried to speed it up, and ran some tests, but nothing worked worth mentioning, so I stuck to just the stuff I actually had working. I found that the regular mode can trigger between 240 and 375 ms, depending on the silent shooting mode on the canon menu for the camera. (silent mode 1 or 2 is faster, because it doesn't close and re-open the shutter first.)
Tests using the magiclantern silent shooting mode put the response at under 100ms, so I suggest using that for things like lightening.
Things I would like to add in the future:
-Configuration for the number of pictures taken in ML silent mode -- currently hard coded to 3
-Still looking to find a way to speed it up.