Fix various issues with SDL mouse scrolling and add a test. Fixes #2643.
Merge pull request #2728 from juj/fix_sdl_mousewheel

Fix various issues with SDL mouse scrolling and add a test. Fixes #2643.