Adds a new option -max_pending_signals. Changes the special heap used for pending signals to take in an initial unit size and not be dependent on the regular heap's default unit sizes. The pending signal heap size is sized to fit -max_pending_signals entries. The default is 8, which rounds up to 12K for x86_64, saving per-thread memory over the prior 32K size.
Adds a pending signal count and warns (in release build too) when the maximum is reached.
Adds a check for getting close to the limit when delivering a pending signal: if so, we proactively allocate a 2nd unit while we can safely acquire locks.
Adds a test of "-max_pending_signals 1" for linux.sig* to the long suite.
Issue: #2575 (closed)