Fix BranchDeletionView's checks on deletion requirements
The recent work to allow registry experts to delete branches involved
changing the permission for deleting branches from `launchpad.Edit` to
`launchpad.Moderate`. That work also changed
`BranchDeletionView.display_deletion_requirements` to check for the
`launchpad.Moderate` permission on deletion requirements (other objects
that may need to be altered or deleted in order for the branch deletion
to proceed). However, those other objects are always of other types
(e.g. merge proposals or recipes), and so that part of the change was
incorrect: we should still check `launchpad.Edit` here.
Fixes a test failure in
`lib/lp/code/stories/branches/xx-branch-deletion.rst`.
Return proxied objects from makeDistroArchSeriesFilter
`LaunchpadObjectFactory` issues `UnproxiedFactoryMethodWarning` when its
methods return objects not wrapped in a security proxy, since that tends
to result in tests that are less accurate simulations of production.
The basic idea is that, rather than interleaving database/disk queries
and actions, we now gather all the information we need from the database
and from the archive on disk at the start, and then separately take all
the actions needed to reconcile them and to keep `by-hash` directories
up to date.