Thread::getMessages() returns ArrayCollection instead of array

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