hashes: be tolerant of longer hash values
Currently all hash values are 40 hex digits when not abbreviated.
That will probably not always be the case.
When using hash values, tolerate longer hashes, but not shorter
ones. The shell matching for this is not exact so things other
than hex digits may appear after the first 40 hex digits.
The regular expression matching, however, requires all hex digits.
Currently loose object sharding continues to match only with exactly
two hex digits for the shard name. That may possibly need to bu
adjusted in the future.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>