Existence Theorems of Hartman–Stampacchia Type for Hemivariational Inequalities and Applications