Properly terminate the command if an error occurred
We must call the finished() function of the Private class and not the
finished() signal of the Command class.
(cherry picked from commit 73e58e3d34876e9cdcb4f91d22a01e3fa9919002)
- GnuPG-bug-id: T7375