cmsBuild: update subpackage functionality for the new scheduler

This patch should avoid re-building a Package if it has one or more Subpackages.

I've tested with CORAL, but not with CMSSW.
I've tested with Subpackages enabled, but not without them (though it should not have any effects if there are no Subpackages involved)

Please test this offline before merging.