Effectiveness of acid-treated agricultural stones used in biopurification systems to avoid pesticide contamination of water resources caused by direct losses: mathematical modelling and thermodynamical study