Fixed ValueError introduced by 47217f2.

To work around the tipically low (256) limit of open file descriptors we
attempt to raise the soft limit using resource.setrlimit. If said limit is
already equal to the system hard limit setrlimit raise a ValueError which
causes runserver to crash.

This commit catches this ValueError, checks if there is enough room for our
FDs and fallbacks to the polling mechanism when it isn't the case.

Refs #21356.