improve determination of which param lines to write into datacard txt files
fix a minor bug in PostFitShapes, and a new utility function to restore the binning of shapes we had to convert for combine