A key target for cutting long waits for hospital treatment has been missed and A&E times have got longer, though the overall number of patients on the waiting list has fallen.