pathencode: skip encoding if input is already longer than maxstorepathlen
Calling basicencode may make the path longer, never shorter. If it's already
too long before, then we don't even need to basicencode it.
test-hybridencode: in practice, extensions aren't really unbound in length
due to the fact that we only get to encode files ending in .i and .d inside
the store