[PhraseAndIterator] Remove temporary arrays when checking matches
Summary:
Instead of copying all positions and applying the the shift on the
copies, apply the shift when comparing the positions.
Reviewers: Baloo, ngraham
Reviewed By: Baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D28865