MPX-support: check for XInput2-header

to be used in [gemglxwindow].

TODO: maybe we also need to check for "-lXi"
separate m_reqTexUnits from #inlets

so we can update m_reqTexUnits from GemState and still be able to free
all inlets without memleaks nor segfaults.

LATER: do we need to update m_reqTexUnits?

Closes http://sourceforge.net/p/pd-gem/bugs/224/