cmake: handle libm, libGL, libGLU and libSDL2 checks consistently

This adds require_{m,gl,glu} functions to build_options.cmake;
consistent with the require_sdl2 function. These are now used to check
dependencies for glxspheres and vogltest.

Except for require_m, all of these functions use cmake's built in
find_path and find_library functions, passing them pkg-config data in as
'HINTS' which, as far as I can tell, seems to be the recommended pattern
for using pkg-config with cmake.

Notably this now means we use pkg-config to look for libGL and libGLU so
developers can optionally manage which specific libraries they build
against using standard pkg-config environment variables on Linux. It's
now also possible to explicitly override the library and include paths
for these as cached cmake variables.