Gareth Bale missed a penalty but assisted both goals as Wales beat Turkey 2-0 in Baku to all but confirm their place in the knockout stage of Euro 2020.