New clean_invoices method
New clean_invoices method

- It now directly accesses the database in order to gain performance
- Handles better the case where paid invoices were present
- [TODO] Implement hooks in sub-modules (sync_gp and message_center)
- [TODO] Test correctness

eicher31/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-switzerland,emgirardin/compassion-modules,emgirardin/compassion-modules,Secheron/compassion-modules,eicher31/compassion-modules,CompassionCH/compassion-switzerland,ndtran/compassion-accounting,ndtran/compassion-accounting,ecino/compassion-modules,ecino/compassion-modules,MickSandoz/compassion-switzerland,MickSandoz/compassion-modules,eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-modules,philippe89/compassion-modules,ecino/compassion-switzerland,Secheron/compassion-switzerland,MickSandoz/compassion-modules,ndtran/compassion-switzerland,ecino/compassion-accounting,Secheron/compassion-switzerland,ecino/compassion-accounting,maxime-beck/compassion-modules,philippe89/compassion-modules,maxime-beck/compassion-modules,ndtran/compassion-modules,ecino/compassion-modules,philippe89/compassion-modules,CompassionCH/compassion-switzerland,eicher31/compassion-modules,eicher31/compassion-modules,MickSandoz/compassion-switzerland,CompassionCH/compassion-modules,ecino/compassion-switzerland,CompassionCH/compassion-accounting,maxime-beck/compassion-modules,ndtran/compassion-switzerland,CompassionCH/compassion-accounting,ndtran/compassion-modules,maxime-beck/compassion-modules,Secheron/compassion-modules,emgirardin/compassion-modules,ndtran/compassion-modules,ecino/compassion-modules,CompassionCH/compassion-modules,ecino/compassion-switzerland,Secheron/compassion-modules,ndtran/compassion-accounting,eicher31/compassion-modules,MickSandoz/compassion-modules,ecino/compassion-modules