message: chain-core: Add split_to method for ReadBuf
  A utility to get a sub-buffer that will be used to read
  a payload with determined length and ensure to not read past
  the limit.
  Also, extend the lifetime of the slice returned by .get_slice() to
  the lifetime of the data referred to by ReadBuf.
diff: @@ -117,13 +117,19 @@ impl<'a> ReadBuf<'a> {
  }
  /// Return a slice of the next bytes from the buffer
  - pub fn get_slice(&mut self, sz: usize) -> Result<&[u8], ReadError> {
  + pub fn get_slice(&mut self, sz: usize) -> Result<&'a [u8], ReadError> {
  self.assure_size(sz)?;
  let s = &self.data[self.offset..self.offset + sz];
  self.offset += sz;
  Ok(s)
  }
  + /// Return a sub-buffer ending at the given byte offset
  + pub fn split_to(&mut self, sz: usize) -> Result<ReadBuf<'a>, ReadError> {
  + let slice = self.get_slice(sz)?;
  + Ok(ReadBuf::from(slice))
  + }
  +
  /// Return the next u8 from the buffer
  pub fn get_u8(&mut self) -> Result<u8, ReadError> {
  self.assure_size(1)?;
  