test asserting checkout should not recreate deleted files
Fix checkout of modified file when missing from wd

This fixes the checkout case when a file is modified between the
baseline and the target and yet missing in the working directory.
The logic for that case appears to have been wrong.

This also adds a useful checkout notify callback to the checkout
test helpers that will count notifications and also has a debug
mode to visualize what checkout thinks that it's doing.
Merge pull request #1664 from arrbee/checkout-deleted-with-fix

Checkout should not recreate deleted files - with fix