[settings] fix dealdlock in SettingsManeger introduced in #3512

As sugested by Montellese, using a shared lock fixes the deadlock in
SettinsManeger.