Add git_submodule_resolve_url()

I'm implementing `git clone --recursive` in libgit2sharp (libgit2/libgit2sharp#640) and need a way to resolve relative submodule urls. As a quick hack, I wrote it in the binding, but @ben [agreed that it belongs to libgit2](https://github.com/libgit2/libgit2sharp/pull/640#discussion-diff-10219274).

I'm not sure if it's best to expose the function directly, as I did here. What do you think?

See also #2174 which should be fixed to make this one useful.

Please review my changes very carefully because this is my first C code with dynamic memory management.