Use WGL_ARB_extensions_string if available.

Some OpenGL implementations (notably Intel on Windows 7 and Wine on
Linux) no longer export WGL_EXT_swap_control in GL_EXTENSIONS. Try to
get WGL extensions string via wglGetExtensionsStringARB, and fall back
to glGetString(GL_EXTENSIONS) for legacy drivers.
Fix compilation issues with MinGW-w64.
Fix Win64 portability issues.
Evaluate errno once when converting to qerror_t.

On some systems errno is defined as a function. That breaks the
assumption that Q_ERR(errno) macro always returns error value (i.e.,
less than zero), making the compiler complain about uninitialized
variables. Fix this by adding Q_Errno wrapper around Q_ERR(errno) that
evaluates errno exactly once.
Show proper error message for non-regular files.
Update Win32 resource scripts.
Remove ‘sv_oldgame_hack’ variable.

GCC 4.6.3 has adopted ‘callee_pop_aggregate_return’ attribute, which
makes it possible to specify exact calling convention to use for
problematic functions like SV_Trace on x86 architecture. Thus,
SV_Trace_Native wrapper is no longer needed on Win32 (a
USE_GAME_ABI_HACK define suffices for recent MinGW-w64).

For code cleareness, remove Linux-specific ‘sv_oldgame_hack’ variable
altogether. In ulikely case someone needs to run an ancient gamei386.so
nowadays, solution is to recompile the server with USE_GAME_ABI_HACK
using recent GCC.

This commit should fix non-x86 architectures where ‘sv_oldgame_hack’ was
erroneously enabled (in particular, Win64, where it was forced).
Silence some unused-but-set-variable warnings.
Detect redirection buffer overflow in a safer way.
Fix RD_CLIENT string truncation.

Limit redirection buffer length to (MAX_STRING_CHARS - 1) instead of
SV_OUTPUTBUF_LENGTH when redirecting to RD_CLIENT target. This fixes
truncated output for clients that don't handle svc_prints longer than
MAX_STRING_CHARS.
Fix use of dangling pointer.
Fix Q_vsnprintf on Win32.

It turns out Win32 _vsnprintf returns -1 in case of overflow. Don't
special case such return value by clearing destination buffer, simply
return (size_t)-1. Rely on the caller to detect overflow correctly.

Handle zero buffer size correctly by using _vscprintf.
Add Q_s(c)nprintf tests.
Use "baseq2" as default gamedir for HTTP downloads.

Instead of sending empty gamedir to the HTTP server, send "baseq2" for all
download types. This way HTTP server setup for default gamedir should be no
different from custom gamedir setup.

Original confusion was stemming from the fact reference R1Q2
implementation of cl_http.c has never special cased empty gamedir. But
due to an unrelated bug regular files (not filelists) were in fact
fetched with full system path prepended, which is typically "./baseq2"
on Win32.

Thus, many server operators put their files into "baseq2" directory,
and Q2PRO has to cope with that.

Here's a list of paths different clients request when attempting to download
"maps/foo.bsp" from a server running default ("baseq2") gamedir:

R1Q2:
/baseq2/maps/foo.bsp
/baseq2/.filelist
//maps/foo.filelist

Q2PRO without this patch:
//maps/foo.bsp
/.filelist
//maps/foo.filelist

Q2PRO with this patch:
/baseq2/maps/foo.bsp
/baseq2.filelist
/baseq2/maps/foo.filelist
Remove zero demo frames recording feature.

This was really obscure and undocumented one, interfering with ‘pause’
command in non-intuitive way. Better remove this code, it has little to
no use anyway.
Clean up client_t structure.

Rearrange variables into logical groups. Fix variable case and spelling.
Make Info_ValueForKey return value safe to modify.
Use token bucket algorithm for rate limiting.

Extend syntax of ‘sv_*_limit’ variables to allow optional burst value
to be specified after an asterisk.
Add ‘sv_namechange_limit’ cvar.

Rate limit client name changes to suppress "foo changed name" flood.
By default, no more than 5 changes per minute is allowed.
Remove unused prototypes.