Intermittent null energy condition violations during inflation and primordial gravitational waves