Anas Sarwar will swap Holyrood for the House of Lords and a ministerial role, leaving Scottish Labour looking for a new leader.