Provide a way for custom commands and targets to set the pool variable
of the ninja build statement. Setting JOB_POOL is not compatible with
USES_TERMINAL, which implies the console pool.
The option is silently ignored with other generators.
Closes: #18483 (closed)
This will create a new commit in order to revert the existing changes.