fix threads [RT#22760]: do not remove from an empty set

looks sane, fixed threads, but breaks other tests
use threads mutex for insert and remove
t/misc/more_leaks.t deadlocks with threads, skip it
fixed all thread deadlocks, tests pass now besides threads global destruction
improve thread locks, try 10 inserts and remove enough

still got the Attempt to free nonexistent shared string 4
and Unbalanced string table refcount: (1) for "8" during global destruction
warnings
Enable t/misc/more_leaks.t threaded: we are now thread-safe
threads: TODO 2nd threads test, still refcount issues RT#22760

In order to fix shared sets, we will need to change to global lock to check
only the SV set object for shared magic, and lock only with such a SV. This will need
a small non-public API change. Also the refcount and HEK deletion issue needs to be fixed.
threads merged