lock: Add integration test
lock: Add integration test

The tests check that the wrapped context is properly canceled whenever
the repository is unlock or when the lock refresh fails.

restic/restic,restic/restic