Adding support for message queue size limits

Users can now set a maximum limit on the message queue size.  If the limit is
exceeded, then the oldest message (i.e. the head) gets removed and deleted.
Getter and setter functions were also added.