lib.connection: Use a more efficient data structure for request queue.

Packets being mostly treated in chronological order, using an ordered data
structure is more efficient in average than a mapping.
As typical operations are:
- appending
- popping first item
- peeking at first item
a collections.deque is more efficient than a list.