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. Here's an example of what this can lead to: http://bit.ly/1nrHgWk

This pull request makes sure that the commit only ends up in one of the log entry arrays.