ref: convert for_each_ref to use struct object_id.

The each_ref_fn typedef has been used for several related functions,
including for_each_ref.  Introduce an additional typedef, each_ref_fn_oid,
that is identical except for taking a struct object_id * instead of an
unsigned char *.  This allows us to convert one function at a time, leading
to smaller patches.  The functions will be folded back together at a later
point.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert head_ref to struct object_id.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert branch, tag, and remote functions

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert for_each_replace_ref to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert submodule each ref functions to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert for_each_glob_ref to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert namespaced ref functions to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert for_each_rawref to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert for_each_reflog to object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
ref: convert reflog entity functions to object_id

Convert the reflog parsing to use GIT_SHA1_HEXSZ as well.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>