Fix segfault in git_status_foreach_ext()

Add tests for the `GIT_STATUS_SHOW_XXX` flags.
Merge pull request #1701 from yorah/fix/gh-1698

Fix segfault in git_status_foreach_ext()