BTreeData: Implements more posix-ish sparse file

Writing 0 bytes or truncating past file end increases file length.
BTreeData: Trivial simplification.
BTreeData: Coding style.

Also, reuse existing local.
BTreeData: Fix data loss on chunk overwrite not reaching chunk end.