Sergio Perez finished third in qualifying for the Turkish Grand Prix, while Racing Point team-mate Lance Stroll clinched his maiden pole around Istanbul Park.