A constructive interior penalty method for optimal control problems with state and input constraints