Outlawing drugs once known as "legal highs" led to waves of violence, self-harm and suicide in prisons, according to a study released by the University of Sussex.