Former Scottish first minister Nicola Sturgeon has announced she will not seek re-election to Holyrood next year.