The SNP group on North Ayrshire Council has given up control of the authority after a by-election defeat.