phlurl_request: introduce default timeout of 10min

To prevent connections hanging indefinitely (as was recently observed),
introduce a high default timeout that will ensure we don't wait forever.

We can later make the timeout customizable if we need to drive e.g. file
downloads through this module.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/loop_test.sh
Arcyd: more detailed profile stats on dashboard

To make it easier to identify where the current bottlenecks are,
instrument the individual methods of abdt_conduit and abdt_branch.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/loop_test.sh
Arcyd: large->small ordering of stats on dash

Make the profiling stats easier to read by ordering them large->small
instead of small->large.

Test Plan:
$ ./precommit
$ ./testbed/arcyd/loop_test.sh
Arcyd: fix exception when landing msg not ascii

Fix an exception that occurs if the commit message suggested by
the Phabricator server for a particular review by the
'get commit message' conduit API cannot be converted to ascii.

Introduce a new module to lossily convert to ascii from unicode and use
that to post-process the commit message from Phabricator.

Test Plan:
poked in test plan with 'horizontal ellipses', exercised with shell:
$ ./testbed/arcyd/test_shell.sh

$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
$ ./testbed/arcyd/loop_test.sh
Arcyd: test_shell - make accept.sh available

Add a new 'accept.sh' available in the 'test shell' environment so that
you can use 'poke.sh' to create new reviews and 'accept.sh' to accept
those reviews without going into the web interface.

Test Plan:
Poke and accept in
$ ./testbed/arcyd/test_shell.sh
move phlgitu_ref.parse_ref_hash -> phlgit_revparse

Move the low-level call to rev-parse down into an individual module so
that others in phlgit might use it later.

Test Plan: $ ./precommit.sh
Arcyd: maintain log of landed branches for gc'ing

Make it possible to for users to safely clean up landed branches locally
by maintaining a log of all the branches which have been landed and
their sha1's before being squashed on to the base branch.

In later work we can write a simple client app to do the actual clean
up.

Test Plan:
added breathing test
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
add new command 'barc', client for arcyd

To make the arcyd workflow easier, create a client application which
will be able to do things like:

  - safely clean up local branches that have been landed
  - validate review branches before pushing them
  - show the status of review branches
  - assist in creating review branches

Created an empty new project with stubs for a command-suite app,
smoketests, autodoc.

Test Plan: $ ./precommit.sh
barc gc: automatically prune landed branches

To help users with the potentially fiddly config to fetch
'refs/arcyd/landinglog' locally, add a prompt if it doesn't appear to be
already set up.

Introduce phlsys_choice to help with presenting such menus to the user.

Don't set up the local repo to fetch the upstream landinglog if it
doesn't exist yet.

There's no point in setting up the local repo to fetch the landinglog
ref if it doesn't exist, in fact this can present the user with some
very puzzling errors.

Test Plan:
poke, accept and gc in
$ ./testbed/arcyd/test_shell.sh
$ ./precommit.sh
Arcyd: use 'barc gc' in system tests

To cover both the client and server side of the 'landinglog', use
'barc gc' to clean up local branches generated during system tests.

Test Plan:
$ ./testbed/arcyd/acceptance_tests.sh
$ ./testbed/arcyd/exercise_arcyd.sh
barc gc: refactor, extract method _prune_branches

Test Plan: $ ./precommit.sh
barc gc: replace dry-run with interactive

Don't modify the git fetch config - when the landing log saturates at
1000 entries then it's going to add maybe ~100K overhead to most fetches
on a busy project.

Instead prompt the user as to whether they want to fetch the landing log
or not.

Replace '--dry-run' option with '--interactive', as it has proven
annoying to seperately preview and perform - this is because you are
prompted to update the landing log each time.

Provide options '--update', '--no-update' to prevent the update
prompting, making the command usable in scripts in some circumstances.

Test Plan:
poke, accept, gc in
$ ./testbed/arcyd/test_shell.sh
$ ./precommit.sh
barc gc: refactor, extract branch printing method

Test Plan:
poke, accept, gc in
$ ./testbed/arcyd/test_shell.sh
$ ./precommit.sh
barc gc: fix first-time fetch, formatting

Fix the first-time fetch command.

Fix current branch check to fire only if we're actually trying to remove
the branch.

Fix the order of some prints.

Test Plan:
poke, accept, gc in
$ ./testbed/arcyd/test_shell.sh
$ ./precommit.sh
meta/install_*: split to 2 files, tools + phab

Split the 'install phabricator' concern out of meta/install_devtools.sh
and into a new file of it's own so that the devtools can be installed on
a machine with an alternate or no Phabricator setup.

Test Plan: on fresh VM: $ ./meta/install_phabricator.sh
testbed/arcyd: no need to fetch landinglog

Don't explicitly fetch the landinglog as 'barc' will do this for us as
necessary.

Do checkout onto master before running barc, it cannot remove the
current branch and we may be on a moribund branch.

Test Plan:
$ ./smoke_tests.sh
$ ./testbed/arcyd/acceptance_tests.sh
arcyd: don't push landinglog

Disable the pushing of the landinglog for now - some repos don't allow
us to write to the ref.

Perhaps we'll add a config option that will allow this later.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
poke, accept, fail to barc in
$ ./testbed/arcyd/test_shell.sh
phldef_conduit: add phid to canned user data

Make it possible to test the handling of phids by copying the
phids from the pre-recorded accounts into the canned data.

Test Plan: $ ./precommit.sh
phlcon_user: fix query limit

Fix an apparent copy and paste mistake, limit of single user query is 1,
not len(email_address)

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
arcyd: fix abort when author is also reviewer

Phabricator does not normally permit the author of a review to be a
reviewer, enforce this rule in Arcyd by removing the author from the
list of reviewers before sending the list of reviewers to Phabricator.

Notify the user that this has happened so that they may check for other
errors in the list of reviewers.

Test Plan:

added coverage to
$ ./testbed/arcyd/acceptance_tests.sh
reviewed error message to make sure it's suitable.

$ ./precommit.sh