[DO NOT MERGE] Implement Stash API.

Based on https://github.com/libgit2/libgit2/pull/2705

Not in master yet, adding so I can test locally.
He can retrieve conflicts and resolve them? Probably the current stash apply API in libgit2 should expose checkout callbacks?