Receiver now has O(1) insertions

We use HashMap to store, and then we transfer to a TreeMap to sort.

I also implemented a naïve checklist for received packets using an
array.