Fixed Platform

Fixed the repository events worker exiting before Supervisor counted it as started

With nothing to do, bin/process-repository-events.php exited in under a second, sooner than Supervisor's startsecs, so Supervisor treated every start as a failure and gave up. It now waits for events, looking every two seconds, and exits after five minutes.

With no events waiting, bin/process-repository-events.php exited after three empty batches a quarter of a second apart. Supervisor's program (deployment/repository-events-supervisor.conf, startsecs=2) counts a program that exits within two seconds as failing to start, so it stayed in STARTING and BACKOFF and would give up as FATAL.

The worker now looks for events every two seconds while there are none and exits after five minutes, so Supervisor starts it again on the current release. A stop signal ends a wait at once. A second copy that finds the lock held waits three seconds before exiting.