Mac: Don't disassociate cursor if window is moving / doesn't have focus.

Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2396
Mac: Forgot return value in last commit.
Improve window recreation logic in OpenGL* renderers
Disable the screensaver by default.

Fixes Bugzilla #2218.
Added a hint to enable the screensaver by default
Null termnate the pUserMappings variable to prevent memory corruption.
Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch

Coriiander

In src\timer\windows\SDL_systimer.c there is an error with regards to timeBeginPeriod and timeEndPeriod. These functions typically get called when no high resolution timer is available, and GetTickCount is not used.

According to MSDN (link: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624(v=vs.85).aspx), for every call to timeBeginPeriod a subsequent call to timeEndPeriod is required. While SDL is currently doing this, it fails to call timeEndPeriod when cleaning up/shutting down SDL. Please note that these functions affect things on a system level. Failing to call timeEndPeriod, disables applications for using WINMM-timers after usage&shutdown of SDL, as effectively they the mechanism is now broken.

Solution:
Ensure this code gets called when shutting down the timer subsystem:

#ifndef USE_GETTICKCOUNT
if (!hires_timer_available)
{
    timeSetPeriod(0);
}
#endif
Fixed bug 2368 - Security Software is blocking RegisterRawInputDevices()

Yamagi

A customer of mine had the strange problem, that SDL_SetRelativeMouseMode() was failing for him on Windows 7. Luckily he was willing to provide some debug informations. We could track this problem down to RegisterRawInputDevices() failing due to security software running on his system (Norton Internet Security to be precise, but there are reports of similar problems with other products. For example [1]). Working around this issue with SDL_WarpMouseInWindow() is easy, and while I don't think that SDL2 can provide an internal workaround it would be really nice and helpfull if this could be documentated somewhere.

1: http://forums.codeguru.com/showthread.php?498374-How-to-run-a-very-long-SQL-statement
Updated with the latest 2.0.2 API changes
Fixed test for libuuid.a
Fixed compiler warning
Fixed compiler warning
Changed SDL_HINT_ACCEL_AS_JOY to SDL_HINT_ACCELEROMETER_AS_JOYSTICK to be more clear.
Force Windows version of SDL_GetPrefPath() to Unicode, create missing dirs.

Fixes Bugzilla #2273.
Mac OS X: Make OpenGL context selection more robust, avoid software fallback.

Fixes Bugzilla #2197.
Added some FIXMEs.
Dynamically load glGetString(), to avoid direct dependency on OpenGL.
Fixed a typo in a comment.
Added a FIXME.
Windows: Fixed crash if quitting without closing an XInput haptic device.