The Scottish Labour leader led his party to its worst ever Holyrood election result, with 17 MSPs returned to the Scottish Parliament.