posixworker: avoid creating workers that end up getting no work
If `workers` (the detected or configured number of CPUs) is greater
than the number of work items, then some of the workers end up getting
0 work items. Let's not create such workers.
Differential Revision: https://phab.mercurial-scm.org/D8927
#require docutils gettext
Error: the current ro localization has some rst defects exposed by
moving pager to core. These two warnings about references are expected
until the localization is corrected.
$ $TESTDIR/check-gendoc ro
checking for parse errors
gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.