Revert "Change the order of jobit table updates, so that jobit status is not overwritten for completed jobits."

This reverts commit 84f4a8a207b4e9fadfcb417973e73c566c5d08d4.
Add a counter for how often jobits are skipped.
Fix handling of incomplete jobs.