tests: Add test for riot thread

Test calculates factorial using riot thread and message passing for synchronization.