Introduce AttribArray, a code generator for pseudo-type attrib_list.

Also use it for glXCreateConfigAttribsARB, which gives the expected
correct dumps in qapitrace and glretrace dump.
Nothing needs to change in dump code because it just reads whatever
types were written during tracing. Writing different types into
different array elements is allowed by the format, and it turns out
that even older versions of apitrace will correctly display dumps
created with this patch.
Proper AttribArray / attrib_list support for applicable EGL functions.

The functions are:

eglChooseConfig
eglCreateWindowSurface
eglCreatePbufferSurface
eglCreatePixmapSurface
eglCreatePbufferFromClientBuffer
eglCreateContext
eglCreateImageKHR
eglCreateDRMImageMESA
Proper AttribArray / attrib_list support for applicable GLX functions.

The functions are:

glXChooseFBConfig
glXCreateWindow
glXCreatePixmap
glXCreatePbuffer
glXChooseFBConfigSGIX
glXCreateGLXPbufferSGIX
glXBindTexImageEXT
glXBindVideoDeviceNV
Allow a custom terminator and support valueless keys better.
Proper AttribArray / attrib_list support for applicable CGL functions.

It's just CGLChoosePixelFormat here.
Improvements in AttribArray / attrib/list code generation.

- Treat unknown keys the same way while counting elements and while
  processing them (they are assumed to be followed by an int value).
- Support custom terminators.
- Serialize the terminator.
- Reduce the line count of generated code a bit.
- Add forgotten begin/endElement() around writing the keys.
- Improve comment wording.
Use the right attrib_list terminator and support the remaining functions.

Remaining functions were

eglLockSurfaceKHR
eglCreateSyncKHR
eglCreateFenceSyncNV
attrib_list support for glXChooseVisual, the last GLX function.

It is one of the two functions known to apitrace that can have
attrib_list keys not followed by a value.
attrib_list support for WGL function wglCreateContextAttribsARB.
More WGL support. It's ugly and the resulting code probably doesn't compile.
Warn on unknown attrib_list keys.
Update GLX attrib_list support from GLX 1.3 to 1.4.
GLX: More consistent naming of an AttribArray.
Remove the now unused _AttribList_size.

_AttribPairList_size is still used for WGL's float-based attribs.
Allow float-based attrib_lists as found in WGL.

It also turns out that no "type" member is needed in AttribArray,
so remove it.
WGL: Support float-based attrib_list parameters.

Followup to making it possible in the code generator.
Remove the last helper for the old incomplete attrib_list support.
glstate: Better support for integer textures dumps.
glstate: Try to match the number of channels in internal format.
qapitrace: Add option to replay in singlethreaded mode

Some traces fail to replay (hang) if glretrace does not have
--singelthread on the command line, this change makes a UI option
available.