Revealed: records show border patrol gave inaccurate testimony about people it jailed. Prosecutors now face ‘embarrassing’ dismissals