Fix compactions that could end up breaking a run of the same user
key across multiple files.
As reported in Github issue #339, it is incorrect to split the
same user key across multiple compacted files since it causes
tombstones/newer-versions to be dropped, thereby exposing obsolete
data. There was a fix for #339, but it ended up not fully fixing
the problem. (It checked for boundary problems in the first level
being compacted, but not the second). This problem was revealed
by Github issue 887.
We now adjust boundaries to avoid splitting user keys in both the
first level and the second level.
PiperOrigin-RevId: 374921082