The Republic of Ireland regroup from a sluggish first half to earn a crucial 4-0 win over Greece in the Uefa Women's Nations League game in Heraklion.