unit-tests: Add a test for thread_cancellation_point()