This adds a limit to the number of resources that ResourceChain creates
in parallel. It reduces memory usage drastically when ResourceChain
contains lots of resources. We use the number of active services, which
seems to give a reasonable balance between performance and memory
consumption.
Story: #2003975
Task: #26917
Change-Id: Id20fb89813b32927298b3a7c0abe23da710b04d1
(cherry picked from commit bad27d3886)