Use non-detached threads for clean, deterministic termination
For historical reasons (nothing else available in FreeRTOS on STM32) we are using detached threads, which leads to multiple issues, e.g. #147, #157 (closed). It also prevents a clean shutdown of critical logic such as the storage system that will be implemented in %Flexible Forwarding Interface in AAP 2.0.
We should remove the detached flag and join all threads. Termination should occur by signaling the threads and waiting for their proper shutdown.