Add support for patchset dependencies.

The following is a summary of my changes:

* A new endpoint "get_depends_on_patchset" has been added. This endpoint will be called by apply_issue to form a chain of dependencies to apply to the local checkout. The apply_issue change is here: https://codereview.chromium.org/1149653002/.

* I extracted majority of the new logic into a new module (dependency_utils) and added comprehensive unit tests.

* This CL adds two new fields to the PatchSet model. These fields define the dependency and the dependents of the patchset.

* The dependency and dependents of a patchset are displayed to the user but only in the new UI. I figure we are close enough to making the new UI the default that I can stop doing double UI work.

* I tried to cover all interactions among dependent patchsets, here is a example of dependencies and how different Rietveld actions will impact those dependencies-

                   -> CL3#PS2
CL1#PS2 -> CL2#PS1 -> CL3.1#PS1
                   -> CL3.1#PS2

Explanation of the above: CL3#PS2 & CL3.1#PS1 & CL3.1#PS2 all depend on CL2#PS1 which depends on CL1#PS2.

==Rietveld action: issue is closed and reopened==
- If CL2 is closed then CL2#PS1 shows up with a strikethrough in CL3#PS2 & CL3.1#PS1 & CL3.1#PS2.
- If CL2 is reopened then CL2#PS1 shows up normally (without a strikethrough) in CL3#PS2 & CL3.1#PS1 & CL3.1#PS2.

==Rietveld action: issue is deleted==
- If CL2 is deleted then CL3#PS2 & CL3.1#PS1 & CL3.1#PS2 are updated to remove their dependency on CL2#PS1.
  Additionally, if any patchset of CL2 is a dependent then its dependency is removed. i.e. CL1#PS2 will be updated to remove CL2#PS1 as a dependent.

==Rietveld action: patchset is deleted==
- If CL2#PS1 is deleted then CL3#PS2 & CL3.1#PS1 & CL3.1#PS2 are updated to remove their dependency on CL2#PS1.
  Additionally, if CL2#PS1 is a dependent then its dependency is removed. i.e. CL1#PS2 will be updated to remove CL2#PS1 as a dependent.

Tested end-to-end using a test Git repository (https://skia.googlesource.com/skiabot-test/) and the following CLs created in my test Rietveld instance:
* https://skia-codereview-staging.appspot.com/931002  ('Branch1 CL')
* https://skia-codereview-staging.appspot.com/5001001 ('Branch2 CL')
* https://skia-codereview-staging.appspot.com/9881001 ('Branch3 CL')
* https://skia-codereview-staging.appspot.com/3951001 ('Branch3.1 CL')
Opt into the new UI and observe the new 'Depends on Patchset' and 'Dependent Patchsets' sections in the above CLs.

Design doc is here: https://docs.google.com/document/d/1KZGFKZpOPvco81sYVRCzwlnjGctup71RAzY0MSb0ntc/edit#heading=h.6r6lt4tsvssw

BUG=502255

Review URL: https://codereview.chromium.org/1155513002
8 files changed