Rework memory allocation to heap based RAII objects.

Remove the strict static memory allocation scheme in favour of placing objects on the heap at startup. This still keeps the requirements posed for modern, high performance embedded systems, but makes APIs a lot cleaner.
Status Job ID Name Coverage
  Build
passed #3585
build_cmake

00:16

 
  Test
failed #3586
run_tests

00:13

 
  Sanitizer
skipped #3588
run_address_sanitizer
skipped #3587
run_thread_sanitizer
 
Test run_tests
compilation terminated.
lib/pls/CMakeFiles/pls.dir/build.make:62: recipe for target 'lib/pls/CMakeFiles/pls.dir/src/internal/base/tas_spin_lock.cpp.o' failed
make[2]: *** [lib/pls/CMakeFiles/pls.dir/src/internal/base/tas_spin_lock.cpp.o] Error 1
CMakeFiles/Makefile2:250: recipe for target 'lib/pls/CMakeFiles/pls.dir/all' failed
make[1]: *** [lib/pls/CMakeFiles/pls.dir/all] Error 2
make: *** [all] Error 2
Makefile:140: recipe for target 'all' failed
./ci_scripts/run_tests.sh: line 9: ./bin/tests: No such file or directory
ERROR: Job failed: exit code 1