This is one of my favorite examples of a drummer using the melody in a solo.  The song is "In Walked Bud" from the album "Misterioso" by Thelonious Monk.  Roy is a master of both expressing the melody literally on the drums, and also using the character of the melody as a starting point for improvisation.  Listen to how uses the first chorus to state the melody and the second chorus as a sort of response or continuation of the melody. 

I was first made aware of this example of melodic drumming by a great article by Drori Mondlak in the May 2002 edition of "Modern Drummer".  Sadly I know of no way of getting this article which has a great transcription, if anybody knows of a way of accessing old "Modern Drummer" articles online I would love to hear it.