Clothing was the bright spot for UK retailer Sainsbury's last year as it booked its first loss in a decade.