Crash running `RandomForestClassifier` `fit` with very large values for `n_jobs`

### Describe the bug

When providing `RandomForestClassifier` with a high number of jobs, a `RuntimeError` is raised as the thread fails to start.

```
RuntimeError: can't start new thread
```

We have been fuzzing the library, we originally found this error with the value `n_jobs=562949953421312`, we were able to reduce it to `n_jobs=32067` with consistent crashes. however, it is dependant on system state, and on my system with `n_jobs=32060` it will crash only some of the time. 

Additionally, when given sizes near sys.maxsize e.g. `4611686018427387905`, an error is thrown from `joblib`

```
Traceback (most recent call last):
  File "/share/Work/RandomForestClassifierThread.py", line 6, in <module>
    model.fit([[1]], [[1, 2]])
  File "/usr/local/lib/python3.9/site-packages/sklearn/base.py", line 1151, in wrapper
    return fit_method(estimator, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/sklearn/ensemble/_forest.py", line 456, in fit
    trees = Parallel(
  File "/usr/local/lib/python3.9/site-packages/sklearn/utils/parallel.py", line 65, in __call__
    return super().__call__(iterable_with_config)
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1927, in __call__
    iterator = itertools.islice(iterator, self._pre_dispatch_amount)
ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
```

I suggest setting a maximum value which would ensure the system does not crash, if a user requests a very large number of threads more than is possible, it should just be taken as the most possible, similar to passing -1.

### Steps/Code to Reproduce

```
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_jobs=32067)
model.fit([[1]], [[1, 2]])
```

### Expected Results

No error thrown

### Actual Results

```
/usr/local/lib/python3.9/site-packages/sklearn/base.py:1151: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().
  return fit_method(estimator, *args, **kwargs)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 212, in __init__
    self._repopulate_pool()
  File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 303, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 326, in _repopulate_pool_static
    w.start()
  File "/usr/local/lib/python3.9/multiprocessing/dummy/__init__.py", line 51, in start
    threading.Thread.start(self)
  File "/usr/local/lib/python3.9/threading.py", line 892, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/share/Work/RandomForestClassifierThread.py", line 16, in <module>
    model.fit([[1]], [[1]])
  File "/usr/local/lib/python3.9/site-packages/sklearn/base.py", line 1151, in wrapper
    return fit_method(estimator, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/sklearn/ensemble/_forest.py", line 456, in fit
    trees = Parallel(
  File "/usr/local/lib/python3.9/site-packages/sklearn/utils/parallel.py", line 65, in __call__
    return super().__call__(iterable_with_config)
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1942, in __call__
    next(output)
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1580, in _get_outputs
    self._start(iterator, pre_dispatch)
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1563, in _start
    if self.dispatch_one_batch(iterator):
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1454, in dispatch_one_batch
    self._dispatch(tasks)
  File "/usr/local/lib/python3.9/site-packages/joblib/parallel.py", line 1376, in _dispatch
    job = self._backend.apply_async(batch, callback=batch_tracker)
  File "/usr/local/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 282, in apply_async
    return self._get_pool().apply_async(
  File "/usr/local/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 450, in _get_pool
    self._pool = ThreadPool(self._n_jobs)
  File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 927, in __init__
    Pool.__init__(self, processes, initializer, initargs)
  File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 216, in __init__
    p.terminate()
AttributeError: 'DummyProcess' object has no attribute 'terminate'
```

### Versions

```shell
System:
    python: 3.9.7 (default, Jul 21 2023, 12:03:29)  [GCC 11.3.0]
executable: /usr/local/bin/python3
   machine: Linux-5.19.0-42-generic-x86_64-with-glibc2.35

Python dependencies:
      sklearn: 1.3.0
          pip: 21.2.3
   setuptools: 57.4.0
        numpy: 1.25.1
        scipy: 1.11.1
       Cython: None
       pandas: 2.0.3
   matplotlib: None
       joblib: 1.3.1
threadpoolctl: 3.2.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
    num_threads: 8
         prefix: libgomp
       filepath: /usr/local/lib/python3.9/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
        version: None

       user_api: blas
   internal_api: openblas
    num_threads: 8
         prefix: libopenblas
       filepath: /usr/local/lib/python3.9/site-packages/numpy.libs/libopenblas64_p-r0-7a851222.3.23.so
        version: 0.3.23
threading_layer: pthreads
   architecture: SkylakeX

       user_api: blas
   internal_api: openblas
    num_threads: 8
         prefix: libopenblas
       filepath: /usr/local/lib/python3.9/site-packages/scipy.libs/libopenblasp-r0-23e5df77.3.21.dev.so
        version: 0.3.21.dev
threading_layer: pthreads
   architecture: SkylakeX
```
```

COMMENT:
OK. So what is the reason to set `n_jobs` larger than the number of physical cores? You are certainly having an oversubscription issue (which ultimately ends up with a crash).

Labels: Bug, Needs Triage