testbed/reader-writer/run.sh: tidy, use for loops

Tidy up 'run.sh' by using bash for loops in place of lots of repetition.

Test Plan:
testbed/reader-writer/run.sh
fixup! phlsys_fs: Add atomic_replace_text_file()
Arcyd: write status files w/ atomic swap not lock

Instead of using file locks to ensure that reads of Arcyd's status files
are consistent, use the new atomic_replace_text_file() routine instead.
This enables us to share the status files across machines using NFS.

Test Plan:
$ ./precommit.sh

examine instaweb dashboard with
$ ./testbed/arcyd/test_shell.sh