Flag based newline separation for namelist groups
Flag based newline separation for namelist groups

In order to support file object inputs, it was no longer possible to use
`truncate` to remove the redundant final carriage return that had been
applied after all namelist groups.

The file object input patch implemented an alternative `write` method
which flattened the `Namelist` data and allowed for a more consistent
iteration over namelist groups.

This patch restores the original iteration format, but introduces a
`self._newline` flag, which is initially disabled, but enabled after any
subsequent group entries.

marshallward/f90nml,honnorat/f90nml,honnorat/f90nml,marshallward/f90nml