Merge r1738631, r1738633, r1738635, r1757030, r1757031, r1770752, r1770768 from trunk:
Don't take over scoreboard slots from gracefully finishing threads
Otherwise the old and the new thread will both update the same scoreboard slot with undefined results.
Document which directives set which variables
Make ap_find_child_by_pid() look at all slots that have ever been used.
This is preparation to allow to use more scoreboard slots in mpm event.
mpm_event: minor code simplification
- move variable initializations into declarations - use max_workers variable
mpm_event: don't re-use scoreboard slots that are still in use
This causes inconsistent data in the scoreboard (due to async connections) and makes it difficult to determine what is going on. Therefore it is not a useful fix for the scoreboard-full issues (PR 53555).
The consent on the dev list is that we should allocate/use more scoreboard entries instead.
Use all available scoreboard slots
Allow to use all slots up to ServerLimit. This makes 'scoreboard full' errors much less likely.
And if ther is a situation where the scoreboard is full, don't make any more processes finish gracefully due to reduced load until some old processes have terminated. Otherwise, the situation would get worse once the load increases again.
ap_daemon_limit is renamed to the more descriptive active_server_limit, to make sure that all its uses are taken care of.