Linearization post-processing (O(n^2) fancy chunking)

Another observation (noticed by @sdaftuar): the gathering theorem from prefix-intersection merging also applies here (it shows why swapping adjacent disconnected transaction sequences in a linearization, which each individually would be chunked together, where the latter one has higher feerate, is always an improvement).