Short-circuit input checks with same mtime

If modificationTimeHiRes of input file did not change,
short-circuit test for changes in its stat, content, etc.

This shaves off 8% from the empty build time.