Workaround for SDL_SetRelativeMouseMode bug on OSX.

https://wiki.libsdl.org/SDL_SetRelativeMouseMode

According to the documentation for SDL_SetRelativeMouseMode(), "the
mouse position will not change".  On OSX, this is not true;  calling
SDL_SetRelativeMouseMode(true) moves the cursor to the middle of the
window.

This commit includes a workaround which manually warps the cursor back
to its pre-capture position, when mouse capture is turned off.