Thread::getMessages() returns a Collection instead of array

This PR allow to use doctrine Collection methods when getting a thread messages.