Preserves most inter-entry comment lines and whitespace (but not yet a
comment immediately after an entry, or whitespace/comments after the last
entry.) Whitespace and comment lines are stored as part of the following
entry. Lines after the last entry are stored as an extra ledger file field.
Inspired by Nafai on #ledger.