QueueImpl, address synchronization issues:
1. synchronization of 'paused' was inconsistent.
2. messagesAdded is only accessed inside synchronized blocks, so
   it need not be volatile