Revert "[musicdb] more curl fixes"

This reverts commit 4995c010b67ec20a7f46d0bc08eee5703763bcdb.
Revert "[musicdb] fix the curlfile crash on exit properly this time"

This reverts commit b63bcc3d4dae8ed5404f71bdb2abbc485526eb45.
Revert "[musicdb] fix: avoid crash on exit in curl rate-limiter due to iterator invalidation"

This reverts commit 02f76a216a68f552777caa80b2bd6b0f08de31df.
Revert "[musicdb] implement a per host rate-limiter to avoid hitting the musicbrainz rate-limit and be more friendly to our peers."

This reverts commit 241a4fc0babb108f652b993b2b40a20397433118.
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
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.
Fix unconditional 'true' return from StartUPnP() if HAS_UPNP is true.
Fix possible memory leak in Settings.cpp
Always close test socket in CWebServer::Start()
Prevent memory leak in CWebServer::CreateFileDownloadResponse()
Convert #defines to real integral constants in SmartPlaylist.cpp

The name "group" used in these macros gets confused with the name
of the parameter "group" in various functions in this file when the
macro is expanded (See translateGroup(), etc).

This causes the sizeof() calculation to use the size of a pointer,
rather than the intended size.
Check for valid socket creation before setting options on it in CreateTCPServerSocket()
Fix incorrect iterator comparison in CAlbum::Save()
Fix possible NULL-pointer derefereces in DVDDemuxFFmpeg.cpp
Remove NULL check that can never be true.

We've already validated that render is non-null on all possible
control paths at this point.
Fix copy and paste errors in MusicInfoScanner.cpp
Fix incorrect virtual override in ProfilesManager