Internal: deduplicate useful headers that get copied from REST to transp...

The useful headers are now stored into a `Set` instead of an array so we can easily deduplicate them. A set is also returned instead of an array by the `usefulHeaders` static getter.
I need to sort the headers to compare them with the expected ones (sorted too). I either convert it to an array or to a list so I can use either `Arrays.sort` or `Collections.sort`. I think it's ok then to keep the array?