6,362 people waited more than 24 hours in Scotland’s A&Es last year