CRM-21245: Incorrect Contribution status 'Pending Refund' and Add test of CRM-17151 ported from kainuk PR