librdf_Repository: fix missing mutex lock in various destructors

Change-Id: I5756ab6ff6de0b2532bef9866063f361e330a009
(cherry picked from commit 62fd1aa382c75feaa72f8aa09af4d3fc0b387dcc)
Reviewed-on: https://gerrit.libreoffice.org/7338
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>