Issue #8407: signal.pthread_sigmask() returns a set instead of a list

Update the doc. Refactor also related tests.
3 files changed