Kusal Mendis scored his fifth century and Dunith Wellalage took four wickets as Sri Lanka beat Australia by 174 runs in the second one-day international and swept the two-match series 2-0.