WIP: Refactor memory manager to reduce redundancy.

It is still not working, however we now have no more redundant code, making debugging it simpler.
4 jobs from coninuation in 27 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #3391
build_cmake

00:14

 
  Test
failed #3392
run_tests

00:13

 
  Sanitizer
skipped #3394
run_address_sanitizer
skipped #3393
run_thread_sanitizer
 
Test run_tests
-- Build files have been written to: /builds/gitlab/las3/development/scheduling/predictable_parallel_patterns/cmake-build-release
Scanning dependencies of target pls
make[2]: *** No rule to make target 'lib/pls/CMakeFiles/pls.dir/build'. Stop.
CMakeFiles/Makefile2:104: recipe for target 'lib/pls/CMakeFiles/pls.dir/all' failed
make[1]: *** [lib/pls/CMakeFiles/pls.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
./ci_scripts/run_tests.sh: line 9: ./bin/tests: No such file or directory
ERROR: Job failed: exit code 1