worker: check problem state correctly (issue3982)

If a large update triggered an abort, it was possible for the main
thread to still update the dirstate.

This fix is incomplete, as the failing worker now doesn't generate a
proper error message. This is difficult in the fork-based framework,
which relies on exceptions propagating to the top of the dispatcher
for formatting.