Extract c member access into separate header.
Switch to deque instead of queue.
dequeue_stream does not return any value.

The invariant check is better done elsewhere, e.g. in enqueue_stream()
Remove redundant packet check.
Add missing base_stream functions.