Premier Roger Cook has led WA Labor to a third term in office after the party secured its second largest victory in history and his first as leader.