Whoever follows Humza Yousaf, who is standing down as Scotland's first minister, inherits formidable challenges.