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.
How about:

 - replacing all the `goto cleanup` with `goto error`
 - updating the code below with something like this:

```
	*out_stash_tree = stash_tree;
	*out_base_tree = base_tree;
	*out_index_tree = index_tree;
	*out_index_parent_tree = index_parent_tree;
	*out_untracked_tree = untracked_tree;

	goto cleanup;

error:
	git_tree_free(stash_tree);
	git_tree_free(base_tree);
	git_tree_free(index_tree);
	git_tree_free(index_parent_tree);
	git_tree_free(untracked_tree);

cleanup:
	git_commit_free(untracked_commit);
	git_commit_free(index_parent_commit);
	git_commit_free(index_commit);
	git_commit_free(base_commit);

	return error;
```