Consolidate the string type decoding into Constants
We have the same block of code in both UnpackedObjectLoader and in
RevTag to parse an object type name such as "blob" into the value
we use internally to represent that type. Rather than duplicating
this code we can abstract it out into Constants.decodeTypeString,
the opposite of the existing Constants.encodedTypeString method.
We also can use RawParseUtils.parseBase10 to read the length of an
unpacked object from its header. This parser has generally shown
to be faster than the loop we were using before.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>