Improve parallelisation of generate_ffiles

Currently generate_ffiles calculates one frequency per MPI process, and hence doesn't scale when nproc > nfreq. This can be bypassed if we distribute the calculations over baselines and then redistribute to group by frequency.