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.
I think that you should create it.  Well, not the workdir tree, because again, you should let checkout deal with the workdir.

If you have some tree that contains files `A` and `B` that you want to put on disk, not disrupting what's there and handling conflicts and such, then I would expect that you:

1. Get the tree pointed to by `HEAD`.
2. `git_merge_trees` your tree into that tree.
3. `git_checkout_tree` the result from (2).

This seems like the more direct way to do what you are doing here, but maybe I'm still not understanding.