1ee72a819f qt: Avoid querying unnecessary model data when filtering transactions (João Barbosa)
Pull request description:
This change moves down model data querying to where it's needed. The worst case remains the same (all data is queried and the row passes) but for the average case it improves the filter performance.
Backport of Core PR12621
Depends on D3833