Swinney warns of SNP rebuild delay if leader bid challenged