Sri Lanka collapsed in a heap, losing their last nine wickets for 30 before Babar and Ayub’s steady 30s took Pakistan over the line