Fixed the MessageEndPoint shutting down before reading all of the messages

I added a HasMessage function which returns true or false depending on if the queue for the given serial is empty or not.  If it is empty the endpoint can shut down else it keeps reading.

ticket #682