Re-add the config options to remove the ability for users to change their displayname

Also removes the static usage's of OC_Appconfig and OC_Preferences 

For #6322

cc @karlitschek @DeepDiver1975