performance optimazion for edge queries with getDestinationPHIDs

Summary: Ref T6656 performance optimazion for edge queries with getDestinationPHIDs

Test Plan: accessed reports and several pages containing tasks with edges (projects...)

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6656

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