Wake Forest besegrade Duke 31-7 för att säkra en College Football Playoff-plats och sätta upp en ACC-mästerskapsmatch mot Miami.