DEV: haring: bound the ring geometry to the size of the file
Truncated ring files are not exceptional and the tool wasn't very robust
against them and could easily crash when trying to read past the end of
the mapping. Let's bound the sizes and offsets announced in the header
to the real file size. This also allows to relax some checks that would
reject some malformed files that are now handled as best effort ring v1.
It can be helpful to backport this to stable releases, though no issue
was really reported outside of the dev team.