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.
The problem is that we `read-tree HEAD`, which is going to forget about any files that were present in the stash, but not in the existing `HEAD`.  So if I did:

```sh
echo content >foo
git add foo
git stash
git stash pop
```

you would want `foo` to still be a tracked file. If you do not save away the added files and restore them, then it would become untracked.

Does that answer the question (I am not 100% sure if I understand the confusion, or the original code for that matter :) ).