Support processing of gems that have already been loaded into an IO object.

In particular, this feature is used by rubygems.org to extract metadata
from uploaded gems that have not yet been written to storage.