Refactor deps log splitting, add tests

Factor out a MustBeDepsRecord function from SplitDepsLog, and add tests
for MustBeDepsRecord.

Allow a split candidate to appear as the first 1-3 words of a chunk (and
in principle, the start of a file). If we can't look backwards to rule out
an mtime (because we're too close to the start of the file), then we know
we can't be looking at an mtime.

A deps record won't actually appear at the start of a file, because the
path records it references will come first. An invalid file could start
with a deps record, though, so adjust the
"assert(chunk_start < candidate)" check to allow and discard an empty
word span.

Test: ninja_test
Test: replace SplitByThreads(log.size) with
  SplitByChunkSize<size_t>(log.size, 1) and rerun ninja_test
Test: Short-circuit SplitDepsLog with "return {{ 0, log.size }}" and
  rerun ninja_test
Change-Id: Ibab39b6f429152274e911daaa52fd0e96990cd29
3 files changed