Engineering professor unfairly dismissed by the University of Edinburgh awarded more than £1m after a 13-year legal battle.