Spending watchdog says Home Office processes led to wrongful deportations and detentions.