rtlib: Fix memory leak & race condition in fb_ConReadLine() (Line Input)

The string descriptor returned by fb_ConReadLine() didn't have the temp
flag set, because of that it wasn't being cleaned up when used by the
caller. Now it uses a string descriptor on stack and then returns that
string via fb_StrAllocTempResult() like any other FB function.

Besides the leak, using fb_hStrAllocTmpDesc() without FB_STRLOCK() wasn't
threadsafe.
rtlib: Remove unnecessary temp string descriptor usage in fb_ConReadLine()
rtlib: Handle fb_hStrAllocTemp() failure in DOS/Unix inkey() functions
rtlib: Split off fb_hStrSkip*() functions into their own module

(this should allow them being left out of FB programs when not needed)
rtlib: Fix infinite loop in Line Input on encoded files

It didn't check for EOF (i.e. zero bytes read by fb_FileGetDataEx()),
causing an infinite loop if there was no newline at EOF in the file.

The same problem was fixed in the wstring version in 00355d9.
tests: Add more extensive Encoding + Line Input test
rtl-gfx: Change bsave()'s length parameter to unsigned, to match the gfxlib
rtlib: Fix some issues detected by clang

- warnings about the switch()es on constants, no real issue, some still
  remaining but can't be trivially fixed

- should use "%s" format string for printf()like functions instead of
  printing text string directly (important in general, although in case of
  __fb_ctx.error_msg it's not such a big deal)

- Unix read() returns signed size_t (ssize_t), the error checking (< 0)
  was broken here since size_t was used
rtlib: Fix potential strncat() buffer overflows (thanks, gcc warnings)
rtlib: Fix warnings about unused results of fscanf() and fgets()
rtlib: Handle freopen() failue in Reset(streamno) by setting error code
rtlib: Add "real" Rnd() algorithm using Win32 Crypto API or /dev/urandom

New algorithm number: 5
Implemented by MOD. The goal is to provide much better random numbers.

It's not 100% clear whether the CryptAcquireContext() & co functions are
guaranteed to be present on old Windows systems, but testing on a
Windows 95 (version 4.00.1111) didn't show any issues with loading and
running the exe. It seems though that the Crypt*() functions don't always
work properly, in which case the new Rnd() algorithm will fall back on to
the existing mersenne twister algorithm. (Same for the Linux /dev/urandom
version, if there are any failures)
headers: Add AGS' zlib 1.2.6 update
makefile: Delete .a files before ar'ing to ensure old files are removed

(ar only adds/updates)
gfxlib2: Use _beginthreadex() instead of the unsafe _beginthread()
rtlib: Use fputs() instead of fprintf("%s"), that's faster
gfxlib2: Remove useless < 0 check on unsigned parameter (see also aec3bbb1)
gfxlib2: Re-add the DirectX GUID globals, otherwise we'd have to -ldxguid

(9c77a998 regression)
gfxlib2: Fix lock up with GET_WINDOW_POS on minimized window

When doing ScreenControl(GET_WINDOW_POS) while the graphics
window was minimized, the GetWindowRect() would return a
position of -32000, -32000 (the place where minimized windows
are hidden) and then do a SetWindowPos() with those values,
causing the window to be "re-minimized" immediately. With the
FB program doing such ScreenControl()s in a loop, there's a
race condition there, but if unlucky it could prevent the
window from being able to be restored to normal.

Now GET_WINDOW_POS won't do SetWindowPos() at all anymore,
so the lock up won't happen anymore. Note that it still can
return -32000, -32000 to the FB program as before, if the
graphics window is minimized. IsIconic() could be used to check
for that situation, but so far it seems better not to change
the behaviour there.
makefile: Add DISABLE_GPM/DISABLE_FFI options