Single threaded queues

- [ ] @EEE3 please test and merge
- [ ] tests
  - verify no messages are left in a buffer
  - verify pending_* metrics log appears when value is 0