phlgitu_ref: add is_fq_local_branch()

Add a new Git ref predicate for determining if a given ref is a fully
qualified local branch name.

Test Plan:
$ ./precommit.sh
Add new command: 'barc list'

Introduce a new command to the Arcyd command-line helper tool for
listing out all the review branches being managed by Arcyd and their
status.

Test Plan:
$ ./precommit.sh
Run 'barc list' in a repo with many active reviews and validate output.
Rename files in doc/man/arcyon, generate with loop

Simplify the routine to generate the arcyon doc text files to use a
loop.

Rename the arcyon doc text files so that they use a dash to separate the
words in multi-word subcommands. e.g. 'raw-diff' instead of 'raw_diff'.
This is more consistent and is easier to reduce to a loop.

Test Plan:
Ensure git reports that the files are renamed and have no content
changes.  'git rm' the doc files first to make sure they are all
re-generated.
gen_doc: add arcyd commands to generated man texts

Make it easier to access the arcyd per-command documentation by
maintaining a copy in the repo, this also means it's published anywhere
the source code is visible.

It's important that the documentation is usable, by re-generating in
the pre-commit scripts we ensure that the output version is reviewed
alongside the code that changes it.

Test Plan:
Review the doc after running
./gen_doc.sh
gen_doc: add barc commands to generated man texts

Make it easier to access the barc per-command documentation by
maintaining a copy in the repo, this also means it's published anywhere
the source code is visible.

It's important that the documentation is usable, by re-generating in
the pre-commit scripts we ensure that the output version is reviewed
alongside the code that changes it.

Test Plan:
Review the doc after running
./gen_doc.sh
Add phlsys_fs.lockfile_context()

Support exclusive operations on the filesystem in a similar way to git -
using lockfiles.

The drawback to this is that it's possible to 'leak' the lockfile if the
program is forcibly terminated or exits at 'just the wrong time'.

Test Plan:
exercise lockfile_context() using testbed/lockfile/run.sh, this
simulates multiple writers contending for the same resource in a tight
loop.

Observed that occasionally a lockfile is left behind after killing the
writer processes.
phlsys_fs: add lockfile_wait_context()

Make it easier to work with lockfiles by providing a retry loop helper
for polling on a lock if it cannot be acquired.

Rewrite lockfile tests to take advantage of the more convenient method.

Test plan:
$ ./precommit.sh

Check that new tests finish all jobs
./testbed/lockfile/run_loopers.sh
./testbed/lockfile/run_singles.sh
Add abdt_fs.lockfile_context, update 'arcyd add*'

Make it possible to run multiple 'arcyd add*' operations at the same
time without worry of making the filesystem inconsistent.  Use
phlsys_fs.lockfile_retry_context() to ensure that operations are
exclusive.

Test Plan:
$ ./precommit.sh
Arcyd: refactor, mv repo config parsing to 'start'

Make it possible to do all disk access to repository config files for
'arcyd start' before doing abdi_processrepos.process().

This makes it possible to get a lock on the repository config files
at the top-level of the program and release it before descending into
the arcyd daemon details.

Test Plan:
$ ./precommit.sh
Exclusive fs during arcyd start and stop

Make it possible to start and stop arcyd arbitrarily without the
possibility of running during an 'arcyd add-*' operation or starting
while we're starting, or stopping while we're starting etc.

Test Plan:
$ ./precommit.sh
Exclusive fs during 'arcyd rm-repo'

Make it possible to run 'arcyd rm-repo' without needing to ensure that
'arcyd start/stop/add-*' is being run at the same time; to avoid leaving
the file system in an inconsistant state.

Test Plan:
$ ./precommit.sh
Exclusive fs during 'arcyd fsck'

Run consistency checks and fixes without needing to ensure that
'arcyd start/stop/add-*' are not running at the same time.

Test Plan:
$ ./precommit.sh
Exclusive fs during 'arcyd fetch'

Make it possible to 'arcyd fetch' without needing to manually ensure
that no other arcyd commands are being run at the same time.

Abort if arcyd is currently running to avoid introducing cache
inconsistencies.

Test Plan:
$ ./precommit.sh
Exclusive fs during 'arcyd list-repos'

Make it possible to 'arcyd list-repos' without needing to manually ensure
that no other arcyd commands are being run at the same time.

Test Plan:
$ ./precommit.sh
arcyd fetch: flush output and adjust format

Ensure that you can tell which repo is being processed when running
'arcyd fetch' by flushing stdout before doing the slow operation.

Add a space before the ellipses ' ..' so it looks more like the repo
is being processed and less name has simply been truncated.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/test_shell.sh
    $ cd ../arcyd2
    $ arcyd fetch
arcyd fetch: print status before updating watcher

Let the user know what's happening before potentially blocking for a
while, when the repo snoop url cache is being updated.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/test_shell.sh
    $ cd ../arcyd2
    $ arcyd fetch
WIP: "arcyd restart"