array: fix search for empty arrays
array: fix search for empty arrays

When the array is empty `cmp` never gets set by the comparison
function. Initialize it so we return ENOTFOUND in those cases.

joshtriplett/libgit2,leoyanggit/libgit2,joshtriplett/libgit2,Corillian/libgit2,joshtriplett/libgit2,Corillian/libgit2,Corillian/libgit2,joshtriplett/libgit2,stewid/libgit2,Corillian/libgit2,stewid/libgit2,leoyanggit/libgit2,leoyanggit/libgit2,stewid/libgit2,stewid/libgit2,stewid/libgit2,Corillian/libgit2,leoyanggit/libgit2,Corillian/libgit2,stewid/libgit2,joshtriplett/libgit2,leoyanggit/libgit2,joshtriplett/libgit2,leoyanggit/libgit2