Oman reached the knockout stages of the AFC Asian Cup for the first time after two late goals gave them a 3-1 win over Turkmenistan in their final Group F match.