Fix assert triggered for unbalanced unlock on (auto)save
Summary:
KisDocument::Private::SafeSavingLocker uses a member
KisImageBarrierLockAdapter m_imageLock to do the locking of KisImage.
Which it explicitely locks and unlocks again, to keep locking in balance,
together with std::try_lock.
But KisImageBarrierLockAdapter in its deconstructor unconditionally also
calls unlock on the image, without taking into account any state of other
unlock/lock calls.
Which then triggers the Q_ASSERT(locked()); in KisImage::unlock().
BUG: 363279
Reviewers: dkazakov, Krita:_next
Reviewed By: dkazakov, Krita:_next
Differential Revision: https://phabricator.kde.org/D1645