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.
Don't need to detect connection errors in mocked tests.
Fix the client authentication connection settings.

We weren't handling PKCS12 files properly.
Merge branch 'next'

* next:
  Fix the client authentication connection settings.
  Don't need to detect connection errors in mocked tests.
  Cache a run's finished state when it has finished.