cache: Read behaviour when (offset + read_size > file_size) changed

Now, in case when there are insufficient bytes on read with offset,
read will return data from offset position till the end of file.
This is needed when we try to read first 100 bytes of file and
file is shorted than 100 bytes.
indexes: Fix in get_index_metainfo.

strcpy() replaced with memcpy() to handle null characters in msgpack.