Home Rugby Ireland close in on quarter-finals with win over Spain