Pakistan dismiss hosts for 140 and chase the target in 27 overs to win their first ODI series in Australia since 2002.