Make submodules externally refcounted

`git_submodule` objects were already refcounted internally in case the submodule name was different from the path at which it was stored.  This makes that refcounting externally used as well, so `git_submodule_lookup` and `git_submodule_add_setup` return an object that requires a `git_submodule_free` when done.

- [x] expose `git_submodule_free`
- [x] fix internal use of `git_submodule_lookup` to have a balanced `git_submodule_free`
- [ ] fix and verify tests
- [ ] valgrind valgrind valgrind