A thermodynamics-based cohesive model for interface debonding and friction