Ricky Burns surrendered his grip on the WBO lightweight title as he was beaten on points by American Terence Crawford in Glasgow.