Thousands attend Hamas military rally in Gaza