Speed up imports by using importlib instead of pkg_resources

Speed up imports by up to a second by replacing uses of `pkg_resources`
with the new Python standard library module `importlib.resources` (or,
for Python < 3.7, the backport `importlib_resources`). The old
`pkg_resources` module is known to be slow because it does a lot of
work on startup.

See, for example,
[pypa/setuptools#926](https://github.com/pypa/setuptools/issues/926) and
[pypa/setuptools#510](https://github.com/pypa/setuptools/issues/510).
5 jobs for master in 1 minute and 11 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Dist
failed #763788
dist

00:01:11

 
  Test
skipped #763790
doc
skipped #763789
lint
 
  Deploy
skipped #763792
pages
skipped #763791
sccb
 
Name Stage Failure
failed
dist Dist
*.whl: found 1 matching files                      
requirements.txt: found 1 matching files

ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: Post https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: net/http: TLS handshake timeout id=763788 token=n2-TWG9b
WARNING: Retrying... context=artifacts-uploader error=invalid argument
ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: Post https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: net/http: TLS handshake timeout id=763788 token=n2-TWG9b
WARNING: Retrying... context=artifacts-uploader error=invalid argument
ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: Post https://git.ligo.org/api/v4/jobs/763788/artifacts?artifact_format=zip&artifact_type=archive: net/http: TLS handshake timeout id=763788 token=n2-TWG9b
FATAL: invalid argument
ERROR: Job failed: exit code 1