template: Move type functions near constructors

Type functions and constructors share a lot of similarities; plus, we
have a bunch of type functions that act as constructors.

Fixes: #99
3 jobs for type-funcs in 1 minute and 41 seconds (queued for 7 seconds)
Status Name Job ID Coverage
  Check
passed flake8 #1489609

00:01:22

failed mypy #1489610
allowed to fail

00:01:37

passed reuse #1489611

00:01:40

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