vid: overhaul modesetting
Implements hardware refresh rate modesetting, this wasn't implemented
yet for SDL2 (although it was partially supported in
c03b106680122333189e42294c4fb3c385307631).
Implements colour depth modesetting but leaves it disabled because
almost all display hardware supports 24bpp only.
Properly integrates desktopfullscreen and display selection into the
modesetting design.
Changes the modesetting design to better suit SDL2 (see comments),
using the code for immediately applying cvar changes in the startup path
too.
Disables immediate-apply of display cvar changes when hardware
modesetting is active and the player is accessing a menu, because
traditional menu designs don't support it: they make players scroll
through a list of resolutions, setting the cvars at each step.
Enables modesetting on Linux: turns out it does still work in SDL2 even
though exclusive fullscreen support was removed. SDL2 replaced
exclusive fullscreen with desktopfullscreen combined with an xrandr
modeset (behaves like desktopfullscreen IF the mode is the same
as the desktop one).
Replaces the 640x480 modesetting fallback with desktopfullscreen, should
be nicer and should always work (the old fallback is still there but
should never be reached).
Adds a debug print of all modes supported by the display (at startup).
Updates modesetting console prints.
Works around an SDL bug when increasing hardware resolution.
Works around an SDL bug where it doesn't set the error string in
SDL_GetClosestDisplayMode() so SDL_GetError would return some unrelated
message.
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>