Improved resource limits handling in the kqueue autoreloader.

Refs #21356. Thanks Loïc.