Ukraine held off a spirited Slovenia fightback to clinch their place at next summer's European Championship finals.