hg-core: return Err if `offset != bytes.len()`...
hg-core: return Err if `offset != bytes.len()`
(D8958#inline-14994 followup 2/2)
[X] make `Index` owner of its bytes
[X] make `Index::new` return an error if `offset != bytes.len()`
Differential Revision:
https://phab.mercurial-scm.org/D9107