Messages: Introduce template functions for getting and outputting the last message in a single thread when in the inbox/sentbox loop. Props boonebgorges. Fixes #5176.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8070 cdf35c40-ae34-48e0-9cc9-0c9da1808c22