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