odb_pack: try lookup before refreshing packs

This reduces the rate of syscalls for the common case of sequences of
object reads from the same pack.

Best of 5 timings for libgit2_clar before this patch:
real	0m7.808s
user	0m1.082s
sys	0m6.443s

After applying this patch:
real	0m7.948s
user	0m1.062s
sys	0m6.609s