Report remaining work based on the current and total work units.

The previous code was the original one, with no justification for
using `lastTotal` instead of the actual current work unit. Changed to
what seems more logical.
Keep track of what files have been compiled

The previous heuristic that a file with error markers means it was compiled
didn’t work very well. We could have a file that has no error markers but
it *was* compiled, in which case we’d add outdated error or warning markers.