Add a proper implementation of redo-ifchange.

This was simply copied from jekor's implementation and should change.
We'll add a native, pure D implementation, if all goes well.
Fix a bunch of mistakes and implement upToDate.

This leaves us with something reasonably useful. Though there're still
lots of problems.