Australia bowled out India inside the final hour of the fourth Test in Melbourne to take a 2-1 lead in the dramatic series.