rewrote get_messages
reduced call count for showing unread messages.
removed unused list
Merge pull request #997 from DirectEmployers/pd-752

[PD-752] Reduced the query count for displaying messages