The SNP unseated Liberal Democrat leader Jo Swinson in a constituency in central Scotland in dramatic result.