Make PreferencesBase stateles.

PreferencesManager is made the only owner of the state. PreferencesBase
only stores the default scope order. Exception is made for ProjectScope
(which still holds the project root directory). There are two failing
tests due to rework.