Add USE_INTERNAL_LIBS, a default for USE_INTERNAL_*

Linux distributions that want to link dependencies externally will
generally want to link (almost) every dependency externally; similarly,
minimal-dependency builds that want to use the embedded copies of
dependencies will generally want to do so for (almost) every dependency.
Make it easier to choose one of those by setting USE_INTERNAL_LIBS=0
or USE_INTERNAL_LIBS=1, respectively.

The default can still be overridden per-dependency; for instance,
"make USE_INTERNAL_LIBS=0 USE_INTERNAL_OPUS=1" will use the system
version of everything except Opus.
Centralize checks for Freetype, with a user override

This lets us find a library in a non-standard library directory
(via -L in the pkg-config metadata), and allows overrides similar to
the Autoconf convention, e.g.

    make FREETYPE_CFLAGS=-I/opt/freetype/include \
        FREETYPE_LIBS="-L/opt/freetype/lib -lfreetype"

If pkg-config didn't work, assume that Freetype is in the default
location.
Allow libcurl to be in a non-standard location on all platforms

We didn't add CURL_CFLAGS to CLIENT_CFLAGS on all platforms, and didn't
use CURL_LIBS at all, so if "pkg-config --libs" returned "-L... -lcurl"
or even "/.../libcurl.a", it wouldn't work.
Allow OpenAL to be in a non-standard location on all platforms

Similar to libcurl, we didn't use OPENAL_LIBS and assumed it was
always "-lopenal".
Allow system libjpeg to be in a non-standard location

It doesn't have pkg-config metadata (at least on Debian), so if the
user doesn't override it, assume normal system paths.
Find system zlib via user override, pkg-config or in standard locations
Look for system Vorbis, Opus and Ogg via pkg-config

As usual, the order of precedence is: user override, pkg-config,
or assume they're in standard locations.

In particular, Opus isn't in the default search path on Debian.
Find Speex via user override, pkg-config or default search path
OpenGL2 don't try to dlight surfaces that had all dlights culled

In the renderers, dlightbits are never cleared from world surfaces.
The dlight image does not repeat, so if it draws on extra surfaces it's
not visible.

However if using a repeating image (tr.defaultImage instead of tr.dlightImage);

  * In OpenGL1 image is only drawn on surfaces close to dlight origin.
  * In OpenGL2 image is draw on surfaces clearly outside the dlight radius, including past non-dlighted surfaces.

It seems there was a similar issue with pshadowBits. So update surface
dlightBits even if 0, like already done for pshadowBits. This causes
only surfaces close to origin to be affected. (Though it is a little
farther than in OpenGL1.)

I have no idea why this isn't a problem in OpenGL1.
Fix SkipRestOfLine going past end of string

If string data starts with a 0 (string terminator), don't skip over it at p++.

Not causing any problems in ioq3 as far as I know.
Remove unused array joy_pressed
Remove unused cvar in_joystickDebug
Fix overstrike/insert logic being reversed in q3_ui
Don't draw client console buffer past top of screen

Thanks @Pan7.
Restore drawing a cut off client console line in 1920x1080

The text lines don't meet at top of the sceen in 1920x1080, restore
drawing a cut off line across the top. In 640x480 this line isn't seen
at all. This is still better then trying to draw twice as many lines
than are actually seen (the way it was before the last commit).
Fix fast-math optimize flag for MinGW x86_64 build

Found by /dev/humancontroller.
-ffast-math for msvc
Merge branch 'pkg-config' of github.com:smcv/ioq3 into master

Conflicts:
	Makefile
Fix up vorbis handling in Makefile
Allow overriding external opus libs/cflags in Makefile

Pointed out by @MAN-AT-ARMS.