Performance optimization for multithreaded applications: do not hold a lock during index access and modification.
Performance optimization for multithreaded applications: do not hold a lock during index access and modification.

Ybc is able to auto-heal broken slots in the index, so it should fix broken
slots, which may appear due to race conditions when multiple concurrent
threads modify and/or access the same slot.

This patch also avoids holding a lock during m_storage_metadata_check() call,
which accesses item's data in the storage. If the given item was cold, its'
access may result in a pagefault, which will block other threads from progress.
So it would be better avoiding holding the lock during
m_storage_metadata_check() call.

This patch increases the speed of multithreaded perftest by up to 400%.

postfix/ybc,postfix/ybc,postfix/ybc