An extended shakedown theory for elastic-plastic-damage material models