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.
Checkout should preserve workdir files that are not in the tree, shouldn't it?  You don't need to tell checkout about what's in the working directory.  It knows that.  You just need to tell checkout the new things you want it to write.