Implemented debugging tracing for SettingsStorage

In order to enable debugging traces the EnableDebuggingTraces bool
setting of the SettingsStorage should be set to true.
Small optimizations to prevent unnecessary saves.

Should be checked during the regular work whether there is a sense to
use contexts.