The SNP has lost multiple by-elections to the Scottish Conservatives in a humiliating triple defeat for the once-dominant party north of the border.