Avoid putting a commit into both new_log_entries and old_log_entries

If the cutoff time is the same as one of the commit times, this commit will be in both new_log_entries and old_log_entries. This pull request makes sure that the commit only ends up in one of the log entry arrays.