Iga Swiatek avoids an early Australian Open exit by turning around a double break in the deciding set to beat Danielle Collins in the second round.