More than 900 people waited on trolleys for more than 12 hours at emergency departments at York and Scarborough trust hospitals in January.