The virial theorem and the dark matter problem in hybrid metric-Palatini gravity