Added git_stash_apply() and git_stash_pop() APIs

This is a tentative implementation of git_stash_apply() based on the actual Git implementation found at https://github.com/git/git/blob/master/git-stash.sh#L440.

Once you have git_stash_apply(), it's trivial to implement git_stash_pop() so I also added it.
That's the exact same heuristics as in Git CLT:
https://github.com/git/git/blob/master/git-stash.sh#L483

The goal appears to be that at this point in time, the index contains modified files, and they should be unstaged because that's what the outcome of `git stash apply` is supposed to be.

I agree it's not super clear what it has to be so "complicated" and the Git source doesn't comment anything, but maybe there are non-obvious edge cases. That's another reason to me to closely match what Git CLT does as that ensures compatibility of the outcome.