Fix a number of git_odb_exists_prefix bugs

The git_odb_exists_prefix API was not dealing correctly when a
later backend returned GIT_ENOTFOUND even if an earlier backend
had found the object.

Additionally, the unit tests were not properly exercising the API
and had a couple mistakes in checking the results.

Lastly, since the backends are not expected to behavior correctly
unless all bytes of the short id are zero except for the prefix,
this makes the ODB prefix APIs explicitly clear out the extra
bytes so the user doesn't have to be as careful.
Add failing test for git_object_short_id
In-memory packing backend
Fix use-after-free in submodule reload

If the first call to release a no-longer-existent submodule freed
the object, the check if a second is needed would dereference the
data that was just freed.
Fix memory leak of submodule branch name
Fix memory leak of test repository object
Merge pull request #2212 from libgit2/rb/submodule-use-after-free

Fix use-after-free in submodule reload code and other memory leaks
Update clar to 587f88a
Sandbox configuration during test runs
Merge pull request #2214 from ethomson/sandbox_config

RFC: Sandbox HOME during test execution
Update clar to 4b75388
Merge pull request #2216 from ethomson/clar

Update clar to 4b75388
Don't reset need_pack

While looping over multiple heads, an up-to-date head will clobber the `remote->need_pack` setting, preventing the rest of the machinery from building and downloading a pack-file, breaking fetches.
Merge pull request #2219 from tiennou/reset-need-pack

Don't reset need_pack
Introduce git_merge_head_id
Merge pull request #2222 from ethomson/merge_head_id

Introduce git_merge_head_id
Const up members of git_merge_file_result
Merge pull request #2224 from ethomson/merge_file_const

Const up members of git_merge_file_result
Add faster git_submodule__is_submodule check
Fix submodule sorting in workdir iterator

With the changes to how git_path_dirload_with_stat handles things
that look like submodules, submodules could end up sorted in the
wrong order with the workdir iterator.  This moves the submodule
check earlier in the iterator processing of a new directory so
that the submodule name updates will happen immediately and the
sort order will be correct.