utils.py: Improve .gir search on Windows

On Windows, we tend to look for .gir files in the $(prefix) directory
indicated by $(prefix)/bin/g-ir-scanner when running g-ir-scanner, so:

*  We add a special case for find_program() to look for g-ir-scanner on
   Windows without any executable extensions, since that is how
   g-ir-scanner is being deployed as a Python script.

*  Update default_search_paths() to first look for the presence of
   g-ir-scanner, and use its "installation prefix" to construct the
   default path where g-ir-scanner looks for the .gir files.

This way, we can make gi-docgen work better on Visual Studio builds
where Python (i.e. the official binary installers from www.python.org)
is generally installed seperately from the $(prefix) of our GNOME stack,
meaning that we can reduce the need to copy the dependent .gir files
from under our $(prefix).
3 jobs for msvc in 2 minutes and 6 seconds
latest
Status Job ID Name Coverage
  Check
passed flake8 #1284571

00:01:42

failed mypy #1284572
allowed to fail

00:02:05

passed reuse #1284573

00:01:56

 
Name Stage Failure
failed
mypy Check
gidocgen/gir/parser.py:984: error: Argument "get_type" to "GType" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1006: error: Argument "name" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1006: error: Argument "symbol_prefix" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1006: error: Argument "ctype" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1008: error: Argument 1 to "set_version" of "GIRElement" has incompatible type "Optional[str]"; expected "str"
gidocgen/utils.py:767: error: Need type annotation for 'found_programs' (hint: "found_programs: Dict[<type>, <type>] = ...")
Found 203 errors in 4 files (checked 16 source files)
Cleaning up file based variables
ERROR: Job failed: exit code 1