Tidy up the `.to_lalinference` function
The purpose of this MR is to tidy up how we convert an arbitrary file to a LALInference
formatted file. This involves converting PESummary parameter names back to the LALInference
parameter names and removing duplicate code.