Cache a run's finished state when it has finished.

A run on Taverna Server cannot come out of the finished state once it has
finished so this is safe to cache.

Care must be taken to ensure that the deleted state takes preference over
finished if the run has been deleted from the server. That is if a run has been
deleted from the server the state should be deleted, not finished.