Updated commit for messages_get_unread function

replaces https://github.com/Elgg/Elgg/pull/5396#issuecomment-16930955

I don't know the prefered process to edit a submitted commit (directly on the website), please tell me if there's a better way than adding a new commit ?

Thanks