Sturgeon resigns as Scotland's first minister