Fix segfault in git_status_foreach_ext()

Fixes #1698.

I also added some tests for all the `GIT_STATUS_SHOW_XXX` values, as they didn't seem to be fully covered before.

Maybe this PR goes in the way of ongoing work on `git_status_`. If that's the case, just tell me and I will close it.