Write the optional columns SDM_WINDOW_FUNNCTION and SDM_NUM_BIN to output
Those optional columns are now properly filled with the input MS subtable
values, if the colums is present.
This solution is similar to commit a5cb8f34474 in branch CAS-11547
but it doesn't need a casacore patch.
Fixes partially CAS-11879