build: Check for the gi python module
The introspection tests depend on the pygobject module, but we currently are not checking if it's available at configuration time, which means we can get build failures like:
ModuleNotFoundError: No module named 'gi'
when running the test suite.