Arcyd: better 'user deleted branch' comment

When a user deletes the branch associated with a review, make an
improved comment which explains the consequences of unlinking the branch
and the review; list the next possible actions.

Test Plan:
$ ./precommit.sh
read comments on 'bad_base' test case review from
$ ./testbed/arcyd/acceptance_tests.sh
Arcyd: better comment on 'missing base' reviews

When a user pushes a branch with a non-existant base, explain how the
name of the branch was interpreted to derive the name of the base and
list out the next possible steps.

Provide a one-liner for deleting the errant branch.

Test Plan:
$ ./precommit.sh
read the 'bad_base' review output from:
$ ./testbed/arcyd/acceptance_tests.sh
abdi_processargs: remove irrelevant comments
abdi_processargs: refactor, use abdt_tryloop

Instead of using phlsys_tryloop directly to retry connecting to Conduit
and fetch from Git, re-use the new abdt_tryloop for these things.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
abdi_processargs: refactor, split fetch & connect

Test Plan: $ ./precommit.sh
abdmail_mailer: refactor, format whole string

Instead of using concetenation, compose the email message string as one
whole string and use format to insert strings, fix the indentation at
run-time using textwrap.dedent().

This seems clearer and certainly less fiddly than concatenation.

Test Plan:
$ ./precommit.sh
examine emails from
$ ./testbed/arcyd/acceptance_tests.sh
abdmail_mailer: better 'unknown email' message

Improve the email that users and admins receive when someone has pushed
a review with an email unknown to Phabricator.

Make suggestions for what to click or type to resolve the issue.

Test Plan:
$ ./precommit.sh
Watch email output from
$ ./testbed/arcyd/acceptance_tests.sh
arcyd/acceptance_tests: better non-creation test

Improve the test for not having created a review by recording the id of
the last review before doing any processing.

Previously this was working by accident, as other functions would also
store their last revision.

Test Plan:
$ ./testbed/arcyd/acceptance_tests.sh
abdt_branch: optimise, avoid redundant marking

Avoid redundantly pushing a tracking branch in the case where a branch
is already marked 'bad_pre_review' and it doesn't have any new commits.

This path shows up fairly hot in the dashboard stats, later we may want
to cover all pushes with a check like this.

Test Plan:
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
paid attention to 'unknown_user' test case
Arcyd: fix fail to push non-ff unknown user branch

Fix the case where a branch is in bad_pre_rev and the branch history is
re-written, we should force push the tracking branch or it will fail.

Test Plan:
Add non-ff update to 'test_unknown_user' in acceptance tests
$ ./precommit.sh
$ ./testbed/arcyd/acceptance_tests.sh
abdt_reporeporter: better unknown user message

When an email address unknown to Phabricator is the primary author of a
review branch, display a more helpful message on the repo dashboard.

Test Plan:
$ ./precommit.sh
read through error message on
$ ./testbed/arcyd/status_html_testbed.sh
abdmail_mailer: fix typos in email message
Arcyon: add 'task-create' command for Maniphest

Add a bare-bones command for adding tasks to Maniphest.

Test Plan:
Add new command to smoketest
$ ./precommit.sh
aoncmd_arcyon: exit w/ return value of subcommand
aoncmd_taskcreate: enforce non-empty title

Although the conduit API currently permits creation of a task with an
empty title, this appears to be a mistake.  Enforce a non-empty title on
the command-line.

Use print function to be forwards-compatible with Python 3.

Test Plan:
$ ./precommit.sh
try to create tasks with empty titles:
$ arcyon task-create ''
$ arcyon task-create ' '
arcyon task-create: support 'description'

Add support for writing the 'description' field when creating a new task
with 'arcyon task-create'.

Test Plan:
$ ./precommit.sh
tried create tasks with descriptions
Arcyon create-task: support 'priority'

When creating a task with 'arcyon task-create', support specifying
priority by name, e.g. 'wish' or 'unbreak_now'.

Test Plan:
extend
$ ./precommit.sh
tried creating with different priorities
arcyon: print summary by default on create/update

Summary:
when using 'arcyon create-revision' or 'arcyon update-revision'
then print a human-readable summary of the operation and the link
to the review so that general users don't have to know how to convert a
revision id into a url.

Provide a new command-line option '--format-id' to get the old
behaviour.

Test Plan:
$ ./precommit.sh
updated and ran
$ ./testbed/arcyon/exercise_arcyon.sh

Reviewers: oparanal, raiyenga, phab

Reviewed By: phab

CC: arcyd

Maniphest Tasks: T33

Differential Revision: https://sibld.phab.dev.bloomberg.com/D171
arcyon task-create: support '--format-id'

Change the default output of 'task-create' to match the style of
'create-revision', i.e. user-friendly output by default and
machine-friendly if requested.

Test Plan:
$ ./precommit.sh
arcyon: support 'format-url' for some commands

When creating or updating revisions and tasks, it may be useful to print
out just the url of the new/updated item for consumption by wrapper
scripts.

Added to
- arcyon create-revision
- arcyon update-revision
- arcyon task-create

Test Plan:
$ ./precommit.sh
Try each of the --format-* options for the affected commands