gst-env: use Path.open() in get_pkgconfig_variable_from_pcfile()

The pcfile argument passed to get_target_install_filename() is
guaranteed to be a Path() object so use the .open() method to open the
file instead of the standard open() function.

This makes it possible to run gst-env.py on older systems with pyhton3.5
where the standard open() function cannot handle Path arguments.

The change fixes errors like the following:

-----------------------------------------------------------------------
$ ninja -C build/ devenv
ninja: Entering directory `build/'
[0/1] Running external command devenv
Traceback (most recent call last):
  File "/home/ao2/gst-build/gst-env.py", line 493, in <module>
    env = get_subprocess_env(options, gst_version)
  File "/home/ao2/gst-build/gst-env.py", line 342, in get_subprocess_env
    elif is_gio_module(target, filename, options.builddir):
  File "/home/ao2/gst-build/gst-env.py", line 121, in is_gio_module
    giomoduledir = PurePath(get_pkgconfig_variable(builddir, 'gio-2.0', 'giomoduledir'))
  File "/home/ao2/gst-build/gst-env.py", line 110, in get_pkgconfig_variable
    return get_pkgconfig_variable_from_pcfile(pcfile, varname)
  File "/home/ao2/gst-build/gst-env.py", line 89, in get_pkgconfig_variable_from_pcfile
    with open(pcfile, 'r', encoding='utf-8') as f:
TypeError: invalid file: PosixPath('/home/ao2/gst-build/build/meson-private/gio-2.0.pc')
FAILED: meson-devenv
-----------------------------------------------------------------------



(cherry picked from commit fa9627eb)

Part-of: <!220>
21 jobs for 1.18 in 4 minutes and 53 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build Docker
passed #5995586
alpine amd64 manifest builder docker

00:00:14

passed #5995585
android docker

00:00:13

passed #5995584
cerbero fedora amd64 docker

00:00:14

passed #5995583
fedora amd64 docker

00:04:45

passed #5995587
gst-indent amd64 docker

00:00:19

 
  Preparation
passed #5995589
gst indent

00:00:07

manual #5995588
manual
manifest
 
  Build
created #5995593
build clang fedora x86_64
created #5995596
docker windows 1809 allowed to fail manual
build msys2
created #5995590
build nodebug fedora x86_64
created #5995591
build static fedora x86_64
created #5995592
build static nodebug fedora x86_64
created #5995594
docker windows 1809
build vs2017 amd64
created #5995595
docker windows 1809
build vs2017 x86
 
  Test
created #5995597
gstreamer
check fedora
created #5995598
gstreamer
integration testsuites fedora 1/4
created #5995599
gstreamer
integration testsuites fedora 2/4
created #5995600
gstreamer
integration testsuites fedora 3/4
created #5995601
gstreamer
integration testsuites fedora 4/4
 
  Integrate
created #5995603
documentation
created #5995602
gstreamer-full