Harnack inequality and applications for stochastic generalized porous media equations