ci-fairy: do not import git from the top

The GitPython module depends in the git command.

Installing git pulls quite some dependencies: eg. in a Debian Buster
system it increases the used space in ~100MB.

We may want to use some of the ci-fairy commands in systems with
constrained space. Since git is used only in some of the commands,
let's import only when it's really needed.

v2:
  - Remove the get_git() helper and patch the git module at
    sys.modules in the tests (Peter).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
16 jobs for tanty/non-mandatory-git in 9 minutes and 18 seconds (queued for 28 seconds)
Child pipeline (parent)
Status Job ID Name Coverage
  Fedora Container Build
passed #5718638
aarch64
fedora:32@container-build@aarch64

00:02:30

passed #5718630
fedora:32@container-build@x86_64

00:01:49

passed #5718645
kvm
fedora:32@qemu-build@x86_64

00:07:53

passed #5718650
fedora:33@container-build@x86_64

00:01:49

passed #5718654
fedora:34@container-build@x86_64

00:01:35

passed #5718632
fedora@cache-container-build@x86_64

00:01:56

 
  Fedora Check
passed #5718677
check labels fedora@x86_64:32

00:00:14

passed #5718674
do not rebuild fedora:32@container-build@x86_64

00:00:19

passed #5718661
fedora:32@base-image@x86_64

00:01:46

passed #5718667
aarch64
fedora:32@check@aarch64

00:00:17

passed #5718658
fedora:32@check@x86_64

00:00:17

passed #5718670
kvm
fedora:32@qemu-check@x86_64

00:01:23

passed #5718682
fedora:33@check@x86_64

00:00:16

passed #5718684
fedora:34@check@x86_64

00:00:25

passed #5718664
fedora@cache-check@x86_64

00:00:12

passed #5718680
pull upstream fedora:32@container-build@x86_64

00:00:29