Hölder continuity conditions for the solvability of Dirichlet problems involving functionals with free discontinuities