x11/libX11: Fix regression with inputh methods
Add an upstream patch to fix regressions with input metods, where input
method clients can't connect to the input method server. [1]
While here, add a patch that removes register keywords and fixes compiles
against libX11 headers with C++17.
PR: 248549 [1]
Reported by: Atsuo Ohki
MFH: 2020Q3