Gladys Berejiklian quits as NSW premier, to quit parliament