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.
New files will get checked out appropriately using `SAFE` in the normal case.  `SAFE_CREATE` exists only for boostrapping in clone, where you are trying to check out a tree that is identical to the index but you have nothing in the working directory.  I would expect that your workdir matches your index (aside from unstaged changes), which is where `SAFE` would apply.