On gradient-enhanced damage and plasticity models for failure in quasi-brittle and frictional materials