Made ResourceEnforcer thread-safe

Updated ResourceEnforcer to use new Service signals. If multiple end events happen simultaneously, only the first one will do a check. Also, in the case of many streams in a job, the frequency of checks is scaled back proportionate to the number of streams.
Merge pull request #1226 from Dr15Jones/threadSafeResourceEnforcer

Thread safety -- Made ResourceEnforcer thread-safe