Optimisations for common cases

There are four optimisations:
- spead_add_packet is made O(1) for a packet that arrives in-order
  (payload_off is higher than other packets already processed)
- spead_got_all_packets is made O(1) in the absense of duplicated
  packets (and still fast overall if few packets are duplicated)
- spead_heap_finalize copies chunks of memory with memcpy, instead of
  looking for one byte at a time
- The packet buffer in the Python code is changed from a Python list to
  a deque, to avoid O(N) insertions.