MDL-45594 simplify message_get_recent_conversations SQL

I am pretty sure that this new SQL is logically equivalent to
the original, and it passes Mark's unit tests. However, it is
hard to be 100% sure.
MDL-45594 core_message: ordered recent notifications by timecreated
MDL-45594 core_message: added unit tests