Proide application-based handle loads; load Slowvote handles from the application

Summary:
Ref T2715. This is pretty straightforward, I think. Notes:

  - Long term, I want to replace `PhabricatorObjectHandleData` with `PhabricatorObjectQuery` and `PhabricatorHandleQuery`. The former's name is a relic of old Facebook stuff and unusual now that everything else uses normal queries.
  - I simplified the amount of work applications need to do in order to populate handles. The should just need to set names and URIs in most cases.

Test Plan: Used `phid.lookup` and `phid.query` to load slowvote handles. Browsed around to load other handles.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6508
Move DifferentialRevision to application PHIDs

Summary: Ref T2715.

Test Plan: Used `phid.lookup` and `phid.query` to load handles. Grepped for `PHID_TYPE_DREV`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6509
Use application handle infrastructure for Releeph Requests and Releeph Projects

Summary: Ref T2715.

Test Plan: Used `phid.query` to query handles. Browsed Releeph.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6510
Delete various dead/nonuseful PHID code

Summary:
Ref T2715.

  - Remove the "PHID" application. `phid.query` provides a reasonable way for developers to get this data without requiring a top-level application.
  - Remove some dead/uncalled code.

Test Plan: No more PHID application. Grepped for callsites.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6511
Use application PHIDs in Releeph, plus more

Summary:
Ref T2715. Ref T3551. Ref T603. This does a few things, but they're all sort of small:

  - We commonly use a `getX()` / `attachX()` pattern, but have very similar code in the `getX()` method every time. Provide a convenience method to make this pattern easier to write.
  - We use `willFilterPage()` in many queries, but it currently is called with zero or more results. This means we have a lot of "if no results, return nothing" boilerplate. Make it call only for one or more results.
  - Implement `PhabricatorPolicyInterface` on `ReleephBranch`. A branch has the same policy as its project.
  - Implement `ReleephBranchQuery`.
  - Move the branch PHID type to application PHID infrastructure.

Test Plan: Browsed Releeph. Used `phid.query` to query branch PHIDs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2715, T3551

Differential Revision: https://secure.phabricator.com/D6512
Use application PHIDs for mailing lists

Summary:
Ref T2715. Ref T603. Ref T2625.

  - Implement policies.
  - Use policy queries.
  - Use ApplicationSearch.
  - Use application PHIDs.

Test Plan: Browsed things with lists CC'd; edited lists; created a list, used `phid.query` to query handles.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2625, T2715

Differential Revision: https://secure.phabricator.com/D6513
Use Application PHIDs for commits

Summary: Ref T2716. Ref T2715. Move CMIT to use Application PHIDs. Nothing too special here, but I consolidated some code into DiffusionCommitQuery. Depends on D6514.

Test Plan: Browsed Diffusion. Browsed Differential/Maniphest with linked commits. Used jump nav; used `phid.lookup` and `phid.query`. Used remarkup for Git and SVN repos. Grepped for PHID_TYPE_CMIT.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715, T2716

Differential Revision: https://secure.phabricator.com/D6515
Use Application PHIDs in Maniphest

Summary: Ref T2715. Switch Maniphest to the new stuff.

Test Plan: Used `phid.query`; `phid.lookup` to load objects.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6516
Use application PHIDs in Pholio Mocks

Summary: Ref T2715. Switch mocks to the new stuff.

Test Plan: Used `phid.query` and `phid.lookup` to find mocks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6517
Remove PhabricatorPHID::fromObjectName

Summary: Ref T2715. This only ever supported like 10% of object types; get rid of it in favor of the new infra.

Test Plan:
  - Ran `bin/search index D12`; `bin/search index <some valid phid>`, `bin/search index derp`.
  - Turned off Search jump, searched for `D12`.
  - Used `phid.lookup`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6519
Convert config to application PHIDs

Summary: Ref T2715.

Test Plan: Used `phid.query` to load config entries. Edited config entries.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6520
Use Application PHIDs in Files

Summary: Ref T2715. Move files to the new stuff.

Test Plan: Used `phid.query`; `phid.lookup` to find files.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6523
Use modern UI elements and application/event-oriented construction in Projects

Summary:
Ref T2715. This partially modernizes projects.

Precursor to using ApplicationSearch, which is a precursor to using application PHIDs.

Then, some day, we will make projects good.

Test Plan: {F51126}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6524
Use ApplicationSearch in projects

Summary: Ref T2715. I stripped a bunch of stuff from the list since it was buggy, slow, or both. Some day, we'll rebuild it.

Test Plan: {F51128}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6525
Use Application PHIDs in Projects

Summary: Ref T2715. Move Projects to the new stuff.

Test Plan: Used `phid.query` to load projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6526
Use application PHIDs in Repositories

Summary: Ref T2715. Move repositories to new app PHIDs.

Test Plan: Used `phid.lookup`; `phid.query`; browsed Diffusion.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6529