Refactor PreferencesStore and IniStore

refs #5682
Rewrite preference DbStore

refs #5682