Remove clearing move link before delete it
When debugging an issue with payment clearing and reconciliation triggers, I found, in case of payment failure, the delete of reconciliations can trigger event that will use the clearing move (like sale_payment: delete->Invoice.post).
Even if it was not the solution to the problem, I think it is any way better to remove the link to clearing move before unreconcile and delete.