The cost of delays to the discharge of patients from hospitals in Scotland has reached nearly £1.5 billion over the last 10 years, according to analysis by Scottish Labour.