Replaced QGL with GLEW.
Merge branch 'master' into glew
Merge branch 'master' into glew
Replace malloc.h by stdlib.h

On true unices malloc.h was never available and on Linux one should
include stdlib.h instead. While this change is necessary to build
rbdoom3 on FreeBSD and other true unices, the big question is what
it means to Windows.
Add FreeBSD defines
Include stddef.h for ptrdiff_t on FreeBSD
Add an explicit cast to shut up g++47 on FreeBSD
There's no libdl on FreeBSD
shut up compiler warnings

and a small comment
Configurable username for Multi-Player (ui_name), com_pause no cheat

D3BFG gets the username from Steam, in the GPL release it just
uses the hostname.
Now it's possible to set a custom name with the ui_name CVAR
(like in classic doom3). If ui_name is empty ("") the hostname
is used.

The window losing focus in MP resulted in the console being spammed
with "changing com_pause not allowed in Multi Player" (or similar)
messages. Added CVAR_NOCHEAT flag to com_pause to get rid of that.
Some timer-related improvements for POSIX

* idSysSignal::Wait should now handle timeouts > 1s better (or at all)
* Use clock_gettime for Sys_Milliseconds()
* Use CLOCK_MONOTONIC_RAW (and CLOCK_MONOTONIC as fallback if
  that's not available) for Sys_Milliseconds() and Sys_Microseconds()
  CLOCK_MONOTONIC can behave strange when NTP is used
* Small fixes in Sys_Microseconds(): use 64bit int to store time
  (like return type...), divide by 1000 (not 1000000) for nsec=>musec
try to fix console deadkey problem
rewrote posix_net.cpp based on win_net.cpp

And suddenly hosting a server on linux works at least locally
(with client and server on the same machine).
Even though there are still strange bugs (massive lags in one
direction, doesn't work in LAN), at least it works at all now.
Print net checksums as unsigned int

because it actually *is* unsigned and the negative values look strange
Fix sending clients from lobby to game when lobby and game are on same server

In the current case (only "direct" lobby backend, i.e. connect to a
server directly), lobby and game are always on the same server anyway..

It used to send the IP of the first network interface.. that kinda works
on Windows and FreeBSD in LANs (i.e. not over the internet or even
behind a NAT), but not at all on Linux, because the first device seems
to be the loopback device there (at least on my machine)..
Now it sends net_ip (so it should even work behind NAT) or, if net_ip is
set to "localhost" (the default), 0.0.0.0 is sent, which the client
interprets as "just use the IP of the lobby you're already connected to"
Don't use net_port as port to connect to

the connect commands supports adding the port with ":"
like "connect 10.1.2.3:27016" - if no port is set, it defaults to 27015

net_port is still used as the port to listen on and to send from.
Add CVar r_displayGLSLCompilerMessages to suppress AMD driver warnings

The AMD drivers output a lot of useless warnings when compiling the shaders.
Those are pretty annoying, especially as idRenderProgManager::LoadGLSLShader
prints out the whole shader with them..
So I added this CVar to suppress them (when it's set to 0)
Add Winsock support to posix_net.cpp (to remove code duplication)

win_net.cpp and posix_net.cpp were almost identical, i.e. caused a lot
of duplicated code.
To get rid of that, unify both files - by adding Winsock support to
posix_net.cpp and, in the next step, moving posix_net.cpp to sys/common/
and removing win_net.cpp
Move sys/posix/posix_net.cpp to sys/common/socket_net.cpp, remove win_net.cpp

and adjust the CMakeLists.txt accordingly
prepare unification of more sys/win32/ and sys/posix/ stuff

because the code is almost the same anyway, so
* add win32 support to sys/posix/posix_signin.cpp
* add posix support to sys/win32/win_savegame.cpp