Implemented the Resource user-count management.
Passes now have validateResources()/invalidateResources() : this is a separate method that deals with resource needed for the pass.
This might replace the "validate" of the resource repositories.
Still need few corrections. Samples to be modified, too.