Do not commit timeline during splitting section

If we commit a timeline while splitting clips we might end up commiting
"half splited" clips. This happens because while splitting, the keyframe
are moved and `KeyframeCurve.__controlSourceChangedCb` is called.

Introduce a context manager on the pipeline so that we ensure that
a section of code is commited atomically.

Fixes #2251
4 jobs from master in 54 minutes and 21 seconds (queued for 1 second)
Status Job ID Name Coverage
  Docker Image
passed #156981
pitivi:1.0

00:39:39

passed #156980
pitivi:master

00:48:45

 
  Build
failed #156982
build

00:04:47

 
  Test Results
passed #156983
test-results

00:00:48

 
Name Stage Failure
failed
build Build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Pruning cache
$ ${RUN_IN_SANDBOX} meson mesonbuild/
The cmake module property is deprecated, use buildsystem cmake or cmake-ninja instead.
fuse: device not found, try 'modprobe fuse' first
error: Build directory /root/pitivi/.flatpak-builder/rofiles/rofiles-kMEOkh not initialized, use flatpak build-init
ERROR: Job failed: exit code 1