Make getters of the Settings class const

Also removed 2 unused functions.
Use const references for Settings methods

Also check for (this == &other) before locking mutexes.
Fix Settings locking
Merge commit '2ae5d3f'

Conflicts:
	src/settings.h