Optimize rehash threshold computing
Fix bug when keys not marks rehashed at all
Waiting for rehashing with sleep