srm: fix IllegalStateTransition for COPY requests

If the user cancels a COPY request then the file request is moved to
state CANCELLED; however, if the copy then succeeds anyway, the SRM
attempts to move the job to state DONE.  This cannot succeed since
CANCELLED is a final state.

Fix this by first checking whether the job is already in a final
state.  Also tidy up some messages.

Target: master
Request: 2.10
Requires-notes: no
Requires-book: no
Acked-by: Tigran Mkrtchyan
Patch: https://rb.dcache.org/r/7147
srm: fix deserialise of TExtraInfo

The SRM saves the content of TExtraInfo for COPY requests, but fails
to deserialise it correctly if the user supplied no TExtraInfo.
This patch fixes that.

Target: master
Request: 2.10
Requires-book: no
Requires-notes: no
Acked-by: Tigran Mkrtchyan
Patch: https://rb.dcache.org/r/7147/
srm: fix NPE when checking delegated credential

The SRM keeps "the best" delegated credential, if the user supplies one.
If the user doesn't delegate a credential then the current code throws
a NPE.  This is fixed with this patch.

Target: master
Request: 2.10
Requires-notes: no
Requires-book: no
Acked-by: Tigran Mkrtchyan
Patch: https://rb.dcache.org/r/7147/