Add get_*_with_header to StripObjectHeader

In some situations, we need to ensure header is held and try to read, so read
interfaces need to accept header argument to allow.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Use rename operation to make colection_move atomic

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Adjust some interfaces to optimize caller codes

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Add read/write operation to store_test.cc

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Return 0 when the offset of read exceed the length of object

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Fix incorrect read and truncate

If the first chunk of object is not read entirely, the current implementation
will contain it entirely which make wrong.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Unify object level lock in GenericObjectMap

Before we copy lock implementation from DBObjectMap which provide with two locks
for header. Here just unify it to make ease.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Add header cache to GenericObjectMap

Header plays a critical role in KeyValueStore, in order to improve performance
to reduce much calls to backend store cache IO path or touch actual IO, cache it
at GenericObjectMap. It will bring on much performance improvement for
KeyValueStore.

Add a new option "keyvaluestore_header_cache_size" to control the size of cache.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>