OSX: Work on PreferencesWindow.

- Lots of work on PreferencesWindow; added several new controls. All
controls from General Preferences now work, are validated and values are
loaded/saved correctly.