Rewrite rap-worker script in an optimized fashion

It now does much less directory reading, and performance should
scale far better with large numbers of recordings.

Semantics should be mostly unchanged, but there's greater use
of '.fail' files to mark errors, and '.done' files are now removed
after all of the following processing steps complete.

The rap worker no longer relies on processing scripts leaving
behind empty directories; those should now be removed where
appropriate.
Remove hardcoded ffmpeg path

The ffmpeg binary should be looked up using the normal PATH mechanism,
it might not always be installed in the same place.
rap-worker: Fixup publish variable references