We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal configure.ac has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers. This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable.
Backport of core PR16408.
Depends on D5632.