Environment: Implement "CEnvironment" class with functions for environment manipulation and add it files to project and to Makefile.in
Environment: Use CEnvironment for win32 in Application.cpp
Merge pull request #1272 from Karlson2k/xbmc_setenv_clean

Implementation of platform-independ environment manipulations
Update special://profile before attempting to load the profile's guisettings.xml file.
When ProfilesManager::m_currentProfile is changed the special://profile path must be updated as well.
Added SetCurrentProfileId() function for manipulating m_currentProfile. Replaced all occurances of direct manipulation by using this function. This makes sure that the special://profile path is updated as well when updating the current profile id.
Since SetCurrentProfileId() is called in ProfilesManager::Load(), the special://profile path is now automatically set which made it obsolete in CApplication::Create().
Remove setting of special://profile path from OnSettingsLoading(); special://profile path is already set to the correct path when the settings are being loaded.
Merge pull request #2715 from leechguy/settings_refactor_profile_fix

[Fix] Load correct guisettings.xml file when switching profile
fixed, sometimes an ferror was returned when using fread, switch to fgets like most other usage of popen