Cummins's all-round performance took Australia to a two-wicket win in Melbourne for 1-0 lead in the three-match series.