Kraigg Brathwaite ends wretched run with hundred for Glamorgan