HPCC-10177 Add code to restrict the number of persist instances

Changes following code review.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>