Use copystring instead of UNCONST.

This version has a higher chance of being accepted upstream.
Reduce diff to upstream.
Apply suggested patch from Alan Coopersmith:

XRRGetProviderInfo returned bad associated_capability list in 64-bit

Unlike most of the values returned by this function, which are arrays
of XIDs (long int), associated_capability is defined as an array of
unsigned int.   _XRead32 reads 32-bit values from the wire protocol
and writes them to the provided buffer as an array of long ints, even
if that means expanding them from 32-bit to 64-bit.   Doing that for
associated_capability resulted in a garbage value between each actual
value, and overflowing the provided buffer into the space for the
provider name (which is written later and would overwrite the overflowed
data).

Created xhiv libXrandr/XRRGetProviderInfo test case to test & confirm.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

Fixes PR 47979, reported and fix tested by martin@
support PictOpOver with 32bit source without alpha, alpha in mask
now KDE3 looks mostly right
( yes, it's almost usable on a 125MHz HyperSPARC )
gtk2 apps still crash though
- fetch fill colour for text drawing in CheckComposite, swap red and blue
  channels as needed
- support solid sources without a drawable
now gtk2 apps no longer crash the Xserver and text is drawn in the correct
colour
next step: 32bit PictOpOver with 32bit mask, gtk2 seems to use those a lot
Add a missing initializer. From Matthieu Herrb in
http://patchwork.freedesktop.org/patch/13855/
enable defines that make xterm able to do UTF-8 if instructed by its
environment to do UTF-8.

That means: "env LC_CTYPE=en_US.UTF-8 xterm" for example will get you
an xterm that will take UTF-8 input and display it correctly, provided it
finds a fitting UTF-8 font.

Note that with this version of xterm, -u8 doesn't actually have an effect
any more, but -lc has.

xterm will record the locale settings it has been started with in the
environment variable XTERM_LOCALE. It is probably a good idea to have
at least the encoding part of LC_CTYPE and XTERM_LOCALE match.
Fix typo in header guard.