phlsys_fs: add 'ensure_dir', 'write_text_file'

Make it easy to write text files and other files at arbitrary paths
without having to worry about creating the intermediate directories
along the path.

Test Plan:
$ ./precommit.sh
abdi_processargs: nicer cli argument strings
Arcyd: add 'init' command

Arcyd is hard to setup.

Make it a bit easier to get started by providing an 'init' command
which create a directory structure managed by a git repo, containing
helpful README's.

Test Plan:
Use 'arcyd init' where appropriate in ./testbed/arcyd/exercise_arcyd.sh
$ ./precommit.sh
Arcyd: add 'add-phabricator' command

Arcyd is hard to setup.

Make it a bit easier to get started by providing an 'add-phabricator'
command which create an appropriate configuration file for the
specified parameters.

Validate the parameters by attempting to connect to the phabricator
instance.

Test Plan:

Use 'arcyd add-phabricator' where appropriate in
./testbed/arcyd/exercise_arcyd.sh

$ ./precommit.sh
Arcyd: add 'add-repo' command

Arcyd is hard to setup.

Make it a bit easier to get started by providing an 'add-repo'
command which creates an appropriate configuration file for the
specified parameters.

Clone the repository and test writing to some of the refs we expect to
manage with Arcyd.

Test Plan:

Use 'arcyd add-repo' where appropriate in
./testbed/arcyd/exercise_arcyd.sh

$ ./precommit.sh
Arcyd: add 'start' command

Arcyd is hard to get running.

Provide a 'start' command which will launch an instance of Arcyd if
the current directory has been set up by the new 'init' and 'add*'
commands.

Test Plan:

Use 'arcyd start' where appropriate in
./testbed/arcyd/exercise_arcyd.sh

$ ./precommit.sh
Arcyd: add 'stop' command

Arcyd is hard to stop gracefully.

Provide 'arcyd stop' to make the options discoverable and documented.

Test Plan:
Use 'arcyd stop' where appropriate in ./testbed/arcyd/exercise_arcyd.sh
$ ./precommit.sh
testbed/arcyd/test_shell.sh: use new cli

Convert test_shell.sh to use the new Arcyd CLI

Test Plan:
$ ./testbed/arcyd/test_shell.sh
add phlsys_pid for working with process ids

Add convenient functions for getting the current pid, checking if a pid
is running and asking a pid to terminate.

Test Plan:
$ ./precommit.sh

Exercised by subsequent commits.
Arcyd: add abdt_fs for working with the filesystem

Centralise and codify the layout and naming of files in the arcyd
working directory.

Provide a class to attach to the directory and access it.

Test Plan:
$ ./precommit.sh

Exercised by subsequent commits.
Arcyd: start and stop commands use pids, abdt_fs

Make Arcyd start and stop able to tell if an instance is already
running and potentially kill it by using it's pid.

Make use of the new abdt_fs to simplify disk operations.

Test Plan:
$ ./precommit.sh

start and stop with
$ ./testbed/arcyd/test_shell.sh
Arcyd: refactor, mv initialise to abdt_fs

Move the bulk of the work of 'arcyd init' to the new abdt_fs module.

Test Plan:
$ ./precommit.sh
Arcyd: refactor, extract 'add-phabricator' fs work

Move the work that 'arcyd add-phabricator' does with the filesystem
to the new abdt_fs module.

Test Plan:
$ ./precommit.sh
Arcyd: refactor, extract 'add-repo' fs work

Move the work that 'arcyd add-repo' does with the filesystem
to the new abdt_fs module.

Test Plan:
$ ./precommit.sh
Arcyd: refactor, extract abdt_fs..._create_config

Extract common config creation code to abdt_fs.Accessor._create_config

Test Plan:
$ ./precommit.sh
Arcyd: add-repo: fetch existing special refs

We want to continue the history of the 'landed' and 'abandoned' refs
if we're importing repositories into a new arcyd instance.

Check if the refs exist and if so then fetch them.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh

land a branch and then create a new arcyd instance in
$ ./testbed/arcyd/test_shell.sh