The amount spent last year by Glasgow on hotels and bed and breakfast for the homeless was the highest ever.