More backporting of debug subpackage support.
Merge pull request #1236 from ktf/backport-debug

More backporting of debug subpackage support.
Merge remote branch 'origin/IB/CMSSW_7_3_X/stable' into IB/CMSSW_7_0_X/stable
Merge remote branch 'origin/IB/CMSSW_7_3_X/gcc491' into IB/CMSSW_7_0_X/stable