Store pending messages in list.

This avoids copying elements around as they are added to the back and fetched from the front.
Merge pull request #7 from fancycode/message_queue_list

Store pending messages in list.