Algebraic cycles and Tate classes on Hilbert modular varieties