Nicola Sturgeon resigns as first minister of Scotland